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.Handler
A handler to allow for callbacks prior and after registering a
ClassFileTransformer.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classA handler for patching byAgentBuilder.PatchMode.GAP.static classA handler for patching byAgentBuilder.PatchMode.OVERLAP.static classA handler for patching byAgentBuilder.PatchMode.SUBSTITUTE.static enumA non-operational handler. -
Method Summary
Modifier and TypeMethodDescriptionvoidonAfterRegistration(Instrumentation instrumentation) Invoked right after registering a class file transformer.voidonBeforeRegistration(Instrumentation instrumentation) Invoked prior to registering a class file transformer.booleanonRegistration(ResettableClassFileTransformer classFileTransformer) Invoked upon registering a class file transformer.
-
Method Details
-
onBeforeRegistration
Invoked prior to registering a class file transformer.- Parameters:
instrumentation- The instrumentation to use.
-
onRegistration
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
Invoked right after registering a class file transformer.- Parameters:
instrumentation- The instrumentation to use.
-