Package net.bytebuddy.agent.builder
Class AgentBuilder.Default.Dispatcher.ForJava6CapableVm
- java.lang.Object
-
- net.bytebuddy.agent.builder.AgentBuilder.Default.Dispatcher.ForJava6CapableVm
-
- All Implemented Interfaces:
AgentBuilder.Default.Dispatcher
- Enclosing interface:
- AgentBuilder.Default.Dispatcher
@Enhance public static class AgentBuilder.Default.Dispatcher.ForJava6CapableVm extends Object implements AgentBuilder.Default.Dispatcher
A dispatcher for a Java 6 capable VM.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.agent.builder.AgentBuilder.Default.Dispatcher
AgentBuilder.Default.Dispatcher.CreationAction, AgentBuilder.Default.Dispatcher.ForJava6CapableVm, AgentBuilder.Default.Dispatcher.ForLegacyVm
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedForJava6CapableVm(Method isNativeMethodPrefixSupported, Method setNativeMethodPrefix, Method addTransformer)Creates a new Java 6 capable dispatcher.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTransformer(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.
-
-
-
Constructor Detail
-
ForJava6CapableVm
protected ForJava6CapableVm(Method isNativeMethodPrefixSupported, Method setNativeMethodPrefix, Method addTransformer)
Creates a new Java 6 capable dispatcher.- Parameters:
isNativeMethodPrefixSupported- TheInstrumentation#isNativeMethodPrefixSupportedmethod.setNativeMethodPrefix- TheInstrumentation#setNativeMethodPrefixmethod.addTransformer- TheInstrumentation#addTransformermethod.
-
-
Method Detail
-
isNativeMethodPrefixSupported
public boolean isNativeMethodPrefixSupported(Instrumentation instrumentation)
Returnstrueif the supplied instrumentation instance supports setting native method prefixes.- Specified by:
isNativeMethodPrefixSupportedin interfaceAgentBuilder.Default.Dispatcher- Parameters:
instrumentation- The instrumentation instance to use.- Returns:
trueif the supplied instrumentation instance supports native method prefixes.
-
setNativeMethodPrefix
public void setNativeMethodPrefix(Instrumentation instrumentation, ClassFileTransformer classFileTransformer, String prefix)
Sets a native method prefix for the supplied class file transformer.- Specified by:
setNativeMethodPrefixin interfaceAgentBuilder.Default.Dispatcher- Parameters:
instrumentation- The instrumentation instance to use.classFileTransformer- The class file transformer for which the prefix is set.prefix- The prefix to set.
-
addTransformer
public void addTransformer(Instrumentation instrumentation, ClassFileTransformer classFileTransformer, boolean canRetransform)
Adds a class file transformer to an instrumentation instance.- Specified by:
addTransformerin interfaceAgentBuilder.Default.Dispatcher- 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.
-
-