Package net.bytebuddy.agent.builder
Interface AgentBuilder.Default.WarmupStrategy.Enabled.Dispatcher
- Enclosing class:
- AgentBuilder.Default.WarmupStrategy.Enabled
@Proxied("java.lang.instrument.ClassFileTransformer")
protected static interface AgentBuilder.Default.WarmupStrategy.Enabled.Dispatcher
A dispatcher to interact with a
ClassFileTransformer
when the module system is active.-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
transform
(ClassFileTransformer target, Object module, ClassLoader classLoader, String name, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] binaryRepresentation) Transforms a class.
-
Method Details
-
transform
@MaybeNull byte[] transform(ClassFileTransformer target, @MaybeNull @Proxied("java.lang.Module") Object module, @MaybeNull ClassLoader classLoader, String name, @MaybeNull Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] binaryRepresentation) throws IllegalClassFormatException Transforms a class.- Parameters:
target
- The transformer to use for transformation.module
- The Java module of the transformed class.classLoader
- The class loader of the transformed class ornull
if loaded by the boot loader.name
- The internal name of the transformed class.classBeingRedefined
- The class being redefined ornull
if not a retransformation.protectionDomain
- The class's protection domain.binaryRepresentation
- The class's binary representation.- Returns:
- The transformed class file or
null
if untransformed. - Throws:
IllegalClassFormatException
- If the class file cannot be generated.
-