Package net.bytebuddy.agent.builder
Interface AgentBuilder.PatchMode.Handler
-
- All Known Implementing Classes:
AgentBuilder.PatchMode.Handler.ForPatchWithGap,AgentBuilder.PatchMode.Handler.ForPatchWithOverlap,AgentBuilder.PatchMode.Handler.ForPatchWithSubstitution,AgentBuilder.PatchMode.Handler.NoOp
- Enclosing class:
- AgentBuilder.PatchMode
protected static interface AgentBuilder.PatchMode.HandlerA handler to allow for callbacks prior and after registering aClassFileTransformer.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classAgentBuilder.PatchMode.Handler.ForPatchWithGapA handler for patching byAgentBuilder.PatchMode.GAP.static classAgentBuilder.PatchMode.Handler.ForPatchWithOverlapA handler for patching byAgentBuilder.PatchMode.OVERLAP.static classAgentBuilder.PatchMode.Handler.ForPatchWithSubstitutionA handler for patching byAgentBuilder.PatchMode.SUBSTITUTE.static classAgentBuilder.PatchMode.Handler.NoOpA non-operational handler.
-
Method Summary
All Methods Instance Methods Abstract 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.
-
-
-
Method Detail
-
onBeforeRegistration
void onBeforeRegistration(java.lang.instrument.Instrumentation instrumentation)
Invoked prior to registering a class file transformer.- Parameters:
instrumentation- The instrumentation to use.
-
onRegistration
boolean onRegistration(ResettableClassFileTransformer classFileTransformer)
Invoked upon registering a class file transformer.- Parameters:
classFileTransformer- The class file transformer to register.- Returns:
trueif a regular registration should be applied to the transformer.
-
onAfterRegistration
void onAfterRegistration(java.lang.instrument.Instrumentation instrumentation)
Invoked right after registering a class file transformer.- Parameters:
instrumentation- The instrumentation to use.
-
-