Package net.bytebuddy.agent.builder
Interface AgentBuilder.Default.Dispatcher
-
- All Known Implementing Classes:
AgentBuilder.Default.Dispatcher.ForJava6CapableVm,AgentBuilder.Default.Dispatcher.ForLegacyVm
- Enclosing class:
- AgentBuilder.Default
protected static interface AgentBuilder.Default.DispatcherA dispatcher for interacting with the instrumentation API.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classAgentBuilder.Default.Dispatcher.CreationActionAn action for creating a dispatcher.static classAgentBuilder.Default.Dispatcher.ForJava6CapableVmA dispatcher for a Java 6 capable VM.static classAgentBuilder.Default.Dispatcher.ForLegacyVmA dispatcher for a legacy VM.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddTransformer(java.lang.instrument.Instrumentation instrumentation, java.lang.instrument.ClassFileTransformer classFileTransformer, boolean canRetransform)Adds a class file transformer to an instrumentation instance.booleanisNativeMethodPrefixSupported(java.lang.instrument.Instrumentation instrumentation)Returnstrueif the supplied instrumentation instance supports setting native method prefixes.voidsetNativeMethodPrefix(java.lang.instrument.Instrumentation instrumentation, java.lang.instrument.ClassFileTransformer classFileTransformer, java.lang.String prefix)Sets a native method prefix for the supplied class file transformer.
-
-
-
Method Detail
-
isNativeMethodPrefixSupported
boolean isNativeMethodPrefixSupported(java.lang.instrument.Instrumentation instrumentation)
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(java.lang.instrument.Instrumentation instrumentation, java.lang.instrument.ClassFileTransformer classFileTransformer, java.lang.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(java.lang.instrument.Instrumentation instrumentation, java.lang.instrument.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.
-
-