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 protected
ForJava6CapableVm(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 void
addTransformer(Instrumentation instrumentation, ClassFileTransformer classFileTransformer, boolean canRetransform)
Adds a class file transformer to an instrumentation instance.boolean
isNativeMethodPrefixSupported(Instrumentation instrumentation)
Returnstrue
if the supplied instrumentation instance supports setting native method prefixes.void
setNativeMethodPrefix(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#isNativeMethodPrefixSupported
method.setNativeMethodPrefix
- TheInstrumentation#setNativeMethodPrefix
method.addTransformer
- TheInstrumentation#addTransformer
method.
-
-
Method Detail
-
isNativeMethodPrefixSupported
public boolean isNativeMethodPrefixSupported(Instrumentation instrumentation)
Returnstrue
if the supplied instrumentation instance supports setting native method prefixes.- Specified by:
isNativeMethodPrefixSupported
in interfaceAgentBuilder.Default.Dispatcher
- Parameters:
instrumentation
- The instrumentation instance to use.- Returns:
true
if 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:
setNativeMethodPrefix
in 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:
addTransformer
in interfaceAgentBuilder.Default.Dispatcher
- 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.
-
-