Class AvoidDuplicatePatchingCBP
- java.lang.Object
-
- org.zeroturnaround.javarebel.integration.support.JavassistClassBytecodeProcessor
-
- org.zeroturnaround.javarebel.integration.support.AvoidDuplicatePatchingCBP
-
- All Implemented Interfaces:
org.zeroturnaround.javarebel.ClassBytecodeProcessor
public class AvoidDuplicatePatchingCBP extends JavassistClassBytecodeProcessor
A CBP that avoids patching a given class when it has already been patched. The mechanism for checking this is to add a field to the class with a comma-separated list of CBP names that have been applied to the class and to check this list for a match before running the cbp.- Author:
- lanza
-
-
Constructor Summary
Constructors Constructor Description AvoidDuplicatePatchingCBP(JavassistClassBytecodeProcessor cbp)AvoidDuplicatePatchingCBP(JavassistClassBytecodeProcessor cbp, String cbpName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intpriority()voidprocess(org.zeroturnaround.bundled.javassist.ClassPool cp, ClassLoader cl, org.zeroturnaround.bundled.javassist.CtClass ctClass)Modifies the class to be loaded.-
Methods inherited from class org.zeroturnaround.javarebel.integration.support.JavassistClassBytecodeProcessor
acceptPathAsClass, acceptPathAsPrimitive, process, process, setImplicitClassNames
-
-
-
-
Constructor Detail
-
AvoidDuplicatePatchingCBP
public AvoidDuplicatePatchingCBP(JavassistClassBytecodeProcessor cbp)
-
AvoidDuplicatePatchingCBP
public AvoidDuplicatePatchingCBP(JavassistClassBytecodeProcessor cbp, String cbpName)
-
-
Method Detail
-
process
public void process(org.zeroturnaround.bundled.javassist.ClassPool cp, ClassLoader cl, org.zeroturnaround.bundled.javassist.CtClass ctClass) throws ExceptionDescription copied from class:JavassistClassBytecodeProcessorModifies the class to be loaded.- Specified by:
processin classJavassistClassBytecodeProcessor- Parameters:
cp- the container ofCtClassobjects.cl- the class loader loading the given class.ctClass- the class representation.- Throws:
Exception
-
priority
public int priority()
- Specified by:
priorityin interfaceorg.zeroturnaround.javarebel.ClassBytecodeProcessor- Overrides:
priorityin classJavassistClassBytecodeProcessor
-
-