Package net.bytebuddy.agent.builder
Interface AgentBuilder.Default.Dispatcher
- Enclosing class:
AgentBuilder.Default
@Proxied("java.lang.instrument.Instrumentation")
protected static interface AgentBuilder.Default.Dispatcher
A dispatcher for interacting with the instrumentation API.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddTransformer(Instrumentation instrumentation, ClassFileTransformer classFileTransformer, boolean canRetransform) Adds a class file transformer to an instrumentation instance.booleanisNativeMethodPrefixSupported(Instrumentation instrumentation) Returnstrueif the supplied instrumentation instance supports setting native method prefixes.voidsetNativeMethodPrefix(Instrumentation instrumentation, ClassFileTransformer classFileTransformer, String prefix) Sets a native method prefix for the supplied class file transformer.
-
Method Details
-
isNativeMethodPrefixSupported
Returnstrueif the supplied instrumentation instance supports setting native method prefixes.- Parameters:
instrumentation- The instrumentation instance to use.- Returns:
trueif the supplied instrumentation instance supports native method prefixes.
-
setNativeMethodPrefix
void setNativeMethodPrefix(Instrumentation instrumentation, ClassFileTransformer classFileTransformer, String prefix) Sets a native method prefix for the supplied class file transformer.- Parameters:
instrumentation- The instrumentation instance to use.classFileTransformer- The class file transformer for which the prefix is set.prefix- The prefix to set.
-
addTransformer
void addTransformer(Instrumentation instrumentation, ClassFileTransformer classFileTransformer, boolean canRetransform) Adds a class file transformer to an instrumentation instance.- Parameters:
instrumentation- The instrumentation instance to use for registration.classFileTransformer- The class file transformer to register.canRetransform-trueif the class file transformer is capable of retransformation.
-