public abstract class JavassistClassBytecodeProcessor extends Object implements org.zeroturnaround.javarebel.ClassBytecodeProcessor
Any sub class is required to implement the
process(ClassPool, ClassLoader, CtClass) method.
Processors that extend this class are cached by default.
| Modifier and Type | Class and Description |
|---|---|
static class |
JavassistClassBytecodeProcessor.CachingPolicy
A caching policy of a
JavassistClassBytecodeProcessor. |
| Constructor and Description |
|---|
JavassistClassBytecodeProcessor() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptPathAsClass(String classname)
Says to javassist if the path can even be a class name.
|
protected JavassistClassBytecodeProcessor.CachingPolicy |
getCachingPolicy()
Returns the caching policy used by this processor.
|
byte[] |
process(ClassLoader cl,
String name,
byte[] bytecode) |
abstract void |
process(org.zeroturnaround.bundled.javassist.ClassPool cp,
ClassLoader cl,
org.zeroturnaround.bundled.javassist.CtClass ctClass)
Modifies the class to be loaded.
|
void |
setImplicitClassNames(Map<String,String> implicitClassNames)
Can modify the class name request from javassist.
|
public byte[] process(ClassLoader cl, String name, byte[] bytecode)
process in interface org.zeroturnaround.javarebel.ClassBytecodeProcessorpublic void setImplicitClassNames(Map<String,String> implicitClassNames)
public boolean acceptPathAsClass(String classname)
public abstract void process(org.zeroturnaround.bundled.javassist.ClassPool cp,
ClassLoader cl,
org.zeroturnaround.bundled.javassist.CtClass ctClass)
throws Exception
cp - the container of CtClass objects.cl - the class loader loading the given class.ctClass - the class representation.Exceptionprotected JavassistClassBytecodeProcessor.CachingPolicy getCachingPolicy()
NEVER, then its transformations may be cached between runs. A processor then needs
to make sure that its process method does not have any side effects.
Also, the processing of a tagless processor may only depend on the arguments (the class loader, the name of the
class and the bytes) and on rebel.* configuration properties. In case of any other
dependencies, a tag should be used to identify the processing configuration. This
method returns ALWAYS if not overridden.Copyright © 2018. All rights reserved.