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.Dispatcher
A dispatcher for interacting with the instrumentation API.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
AgentBuilder.Default.Dispatcher.CreationAction
An action for creating a dispatcher.static class
AgentBuilder.Default.Dispatcher.ForJava6CapableVm
A dispatcher for a Java 6 capable VM.static class
AgentBuilder.Default.Dispatcher.ForLegacyVm
A dispatcher for a legacy VM.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addTransformer(java.lang.instrument.Instrumentation instrumentation, java.lang.instrument.ClassFileTransformer classFileTransformer, boolean canRetransform)
Adds a class file transformer to an instrumentation instance.boolean
isNativeMethodPrefixSupported(java.lang.instrument.Instrumentation instrumentation)
Returnstrue
if the supplied instrumentation instance supports setting native method prefixes.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.
-
-
-
Method Detail
-
isNativeMethodPrefixSupported
boolean isNativeMethodPrefixSupported(java.lang.instrument.Instrumentation instrumentation)
Returnstrue
if the supplied instrumentation instance supports setting native method prefixes.- Parameters:
instrumentation
- The instrumentation instance to use.- Returns:
true
if 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
-true
if the class file transformer is capable of retransformation.
-
-