@HashCodeAndEqualsPlugin.Enhance public static class AgentBuilder.Default.Dispatcher.ForJava6CapableVm extends java.lang.Object implements AgentBuilder.Default.Dispatcher
AgentBuilder.Default.Dispatcher.CreationAction, AgentBuilder.Default.Dispatcher.ForJava6CapableVm, AgentBuilder.Default.Dispatcher.ForLegacyVm
Modifier and Type | Field and Description |
---|---|
private java.lang.reflect.Method |
addTransformer
The
Instrumentation#addTransformer method. |
private java.lang.reflect.Method |
isNativeMethodPrefixSupported
The
Instrumentation#isNativeMethodPrefixSupported method. |
private java.lang.reflect.Method |
setNativeMethodPrefix
The
Instrumentation#setNativeMethodPrefix method. |
Modifier | Constructor and Description |
---|---|
protected |
ForJava6CapableVm(java.lang.reflect.Method isNativeMethodPrefixSupported,
java.lang.reflect.Method setNativeMethodPrefix,
java.lang.reflect.Method addTransformer)
Creates a new Java 6 capable dispatcher.
|
Modifier and Type | Method and 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)
Returns
true 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.
|
private final java.lang.reflect.Method isNativeMethodPrefixSupported
Instrumentation#isNativeMethodPrefixSupported
method.private final java.lang.reflect.Method setNativeMethodPrefix
Instrumentation#setNativeMethodPrefix
method.private final java.lang.reflect.Method addTransformer
Instrumentation#addTransformer
method.protected ForJava6CapableVm(java.lang.reflect.Method isNativeMethodPrefixSupported, java.lang.reflect.Method setNativeMethodPrefix, java.lang.reflect.Method addTransformer)
isNativeMethodPrefixSupported
- The Instrumentation#isNativeMethodPrefixSupported
method.setNativeMethodPrefix
- The Instrumentation#setNativeMethodPrefix
method.addTransformer
- The Instrumentation#addTransformer
method.public boolean isNativeMethodPrefixSupported(java.lang.instrument.Instrumentation instrumentation)
true
if the supplied instrumentation instance supports setting native method prefixes.isNativeMethodPrefixSupported
in interface AgentBuilder.Default.Dispatcher
instrumentation
- The instrumentation instance to use.true
if the supplied instrumentation instance supports native method prefixes.public void setNativeMethodPrefix(java.lang.instrument.Instrumentation instrumentation, java.lang.instrument.ClassFileTransformer classFileTransformer, java.lang.String prefix)
setNativeMethodPrefix
in interface AgentBuilder.Default.Dispatcher
instrumentation
- The instrumentation instance to use.classFileTransformer
- The class file transformer for which the prefix is set.prefix
- The prefix to set.public void addTransformer(java.lang.instrument.Instrumentation instrumentation, java.lang.instrument.ClassFileTransformer classFileTransformer, boolean canRetransform)
addTransformer
in interface AgentBuilder.Default.Dispatcher
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.