Package net.bytebuddy.agent.builder
Class AgentBuilder.PatchMode.Handler.ForPatchWithGap
- java.lang.Object
-
- net.bytebuddy.agent.builder.AgentBuilder.PatchMode.Handler.ForPatchWithGap
-
- All Implemented Interfaces:
AgentBuilder.PatchMode.Handler
- Enclosing interface:
- AgentBuilder.PatchMode.Handler
@Enhance public static class AgentBuilder.PatchMode.Handler.ForPatchWithGap extends java.lang.Object implements AgentBuilder.PatchMode.Handler
A handler for patching byAgentBuilder.PatchMode.GAP.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.agent.builder.AgentBuilder.PatchMode.Handler
AgentBuilder.PatchMode.Handler.ForPatchWithGap, AgentBuilder.PatchMode.Handler.ForPatchWithOverlap, AgentBuilder.PatchMode.Handler.ForPatchWithSubstitution, AgentBuilder.PatchMode.Handler.NoOp
-
-
Field Summary
Fields Modifier and Type Field Description private ResettableClassFileTransformerclassFileTransformerThe class file transformer to deregister.
-
Constructor Summary
Constructors Modifier Constructor Description protectedForPatchWithGap(ResettableClassFileTransformer classFileTransformer)Creates a new handler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonAfterRegistration(java.lang.instrument.Instrumentation instrumentation)Invoked right after registering a class file transformer.voidonBeforeRegistration(java.lang.instrument.Instrumentation instrumentation)Invoked prior to registering a class file transformer.booleanonRegistration(ResettableClassFileTransformer classFileTransformer)Invoked upon registering a class file transformer.
-
-
-
Field Detail
-
classFileTransformer
private final ResettableClassFileTransformer classFileTransformer
The class file transformer to deregister.
-
-
Constructor Detail
-
ForPatchWithGap
protected ForPatchWithGap(ResettableClassFileTransformer classFileTransformer)
Creates a new handler.- Parameters:
classFileTransformer- The class file transformer to deregister.
-
-
Method Detail
-
onBeforeRegistration
public void onBeforeRegistration(java.lang.instrument.Instrumentation instrumentation)
Invoked prior to registering a class file transformer.- Specified by:
onBeforeRegistrationin interfaceAgentBuilder.PatchMode.Handler- Parameters:
instrumentation- The instrumentation to use.
-
onRegistration
public boolean onRegistration(ResettableClassFileTransformer classFileTransformer)
Invoked upon registering a class file transformer.- Specified by:
onRegistrationin interfaceAgentBuilder.PatchMode.Handler- Parameters:
classFileTransformer- The class file transformer to register.- Returns:
trueif a regular registration should be applied to the transformer.
-
onAfterRegistration
public void onAfterRegistration(java.lang.instrument.Instrumentation instrumentation)
Invoked right after registering a class file transformer.- Specified by:
onAfterRegistrationin interfaceAgentBuilder.PatchMode.Handler- Parameters:
instrumentation- The instrumentation to use.
-
-