T
- The type of the value that is passed between the callback methods.public static interface ResettableClassFileTransformer.WithDelegation.Callback<T>
Modifier and Type | Method and Description |
---|---|
void |
onAfterTransform(T value,
JavaModule module,
ClassLoader classLoader,
String internalName,
Class<?> classBeingRedefined,
ProtectionDomain protectionDomain,
byte[] binaryRepresentation)
Invoked after the transformation is applied.
|
T |
onBeforeTransform(JavaModule module,
ClassLoader classLoader,
String internalName,
Class<?> classBeingRedefined,
ProtectionDomain protectionDomain,
byte[] binaryRepresentation)
Invoked before the transformation is applied.
|
@MaybeNull T onBeforeTransform(@MaybeNull JavaModule module, @MaybeNull ClassLoader classLoader, @MaybeNull String internalName, @MaybeNull Class<?> classBeingRedefined, @MaybeNull ProtectionDomain protectionDomain, byte[] binaryRepresentation) throws IllegalClassFormatException
module
- The instrumented class's Java module or null
if the module system is not supported.classLoader
- The type's class loader or null
if the type is loaded by the bootstrap loader.internalName
- The internal name of the instrumented class.classBeingRedefined
- The loaded Class
being redefined or null
if no such class exists.protectionDomain
- The instrumented type's protection domain or null
if not available.binaryRepresentation
- The class file of the instrumented class in its current state.null
.IllegalClassFormatException
- If the class file was found invalid.void onAfterTransform(@MaybeNull T value, @MaybeNull JavaModule module, @MaybeNull ClassLoader classLoader, @MaybeNull String internalName, @MaybeNull Class<?> classBeingRedefined, @MaybeNull ProtectionDomain protectionDomain, byte[] binaryRepresentation) throws IllegalClassFormatException
value
- The value that was returned before transformation.module
- The instrumented class's Java module or null
if the module system is not supported.classLoader
- The type's class loader or null
if the type is loaded by the bootstrap loader.internalName
- The internal name of the instrumented class.classBeingRedefined
- The loaded Class
being redefined or null
if no such class exists.protectionDomain
- The instrumented type's protection domain or null
if not available.binaryRepresentation
- The class file of the instrumented class in its current state.IllegalClassFormatException
- If the class file was found invalid.Copyright © 2014–2025. All rights reserved.