public abstract class AbstractClassModificationProcessor
extends java.lang.Object
implements com.github.randomcodeorg.ppplugin.PProcessor
| Modifier and Type | Field and Description |
|---|---|
protected com.github.randomcodeorg.ppplugin.PContext |
context
The context of this processor.
|
| Constructor and Description |
|---|
AbstractClassModificationProcessor()
Creates a new instance of
AbstractClassModificationProcessor. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doRun()
Iterates over all compiled classes and calls
processClass(ByteCodeHelper, CtClass, Class). |
void |
init(com.github.randomcodeorg.ppplugin.PContext context) |
protected abstract void |
processClass(ByteCodeHelper helper,
javassist.CtClass ctClass,
java.lang.Class<?> clazz)
Processes the given class.
|
void |
run(com.github.randomcodeorg.ppplugin.PContext context) |
protected com.github.randomcodeorg.ppplugin.PContext context
public AbstractClassModificationProcessor()
AbstractClassModificationProcessor.public void init(com.github.randomcodeorg.ppplugin.PContext context)
init in interface com.github.randomcodeorg.ppplugin.PProcessorpublic void run(com.github.randomcodeorg.ppplugin.PContext context)
run in interface com.github.randomcodeorg.ppplugin.PProcessorprotected void doRun()
throws javassist.NotFoundException
processClass(ByteCodeHelper, CtClass, Class).javassist.NotFoundException - Is thrown if the javassist ClassPool could not be created.protected abstract void processClass(ByteCodeHelper helper, javassist.CtClass ctClass, java.lang.Class<?> clazz) throws javassist.CannotCompileException
ByteCodeHelper.edit(CtClass, Class) of the given helper if a class was edited. A call to ByteCodeHelper.commit() will
be done automatically.helper - The ByteCodeHelper to be used.ctClass - The javassist CtClass to process.clazz - The corresponding Class.javassist.CannotCompileException - If the changes could not be compiled.Copyright © 2015. All Rights Reserved.