@HashCodeAndEqualsPlugin.Enhance public static class AgentBuilder.RedefinitionStrategy.Dispatcher.ForJava6CapableVm extends java.lang.Object implements AgentBuilder.RedefinitionStrategy.Dispatcher
AgentBuilder.RedefinitionStrategy.Dispatcher.CreationAction, AgentBuilder.RedefinitionStrategy.Dispatcher.ForJava6CapableVm, AgentBuilder.RedefinitionStrategy.Dispatcher.ForLegacyVm
Modifier and Type | Field and Description |
---|---|
private java.lang.reflect.Method |
isModifiableClass
The
Instrumentation#isModifiableClass method. |
private java.lang.reflect.Method |
isRetransformClassesSupported
The
Instrumentation#isRetransformClassesSupported method. |
private java.lang.reflect.Method |
retransformClasses
The
Instrumentation#retransformClasses method. |
Modifier | Constructor and Description |
---|---|
protected |
ForJava6CapableVm(java.lang.reflect.Method isModifiableClass,
java.lang.reflect.Method isRetransformClassesSupported,
java.lang.reflect.Method retransformClasses)
Creates a new Java 6 capable dispatcher.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isModifiableClass(java.lang.instrument.Instrumentation instrumentation,
java.lang.Class<?> type)
Checks if the supplied type is modifiable.
|
boolean |
isRetransformClassesSupported(java.lang.instrument.Instrumentation instrumentation)
Checks if retransformation is supported for the supplied instrumentation instance.
|
void |
retransformClasses(java.lang.instrument.Instrumentation instrumentation,
java.lang.Class<?>[] type)
Retransforms the supplied classes.
|
private final java.lang.reflect.Method isModifiableClass
Instrumentation#isModifiableClass
method.private final java.lang.reflect.Method isRetransformClassesSupported
Instrumentation#isRetransformClassesSupported
method.private final java.lang.reflect.Method retransformClasses
Instrumentation#retransformClasses
method.protected ForJava6CapableVm(java.lang.reflect.Method isModifiableClass, java.lang.reflect.Method isRetransformClassesSupported, java.lang.reflect.Method retransformClasses)
isModifiableClass
- The Instrumentation#isModifiableClass
method.isRetransformClassesSupported
- The Instrumentation#isRetransformClassesSupported
method.retransformClasses
- The Instrumentation#retransformClasses
method.public boolean isModifiableClass(java.lang.instrument.Instrumentation instrumentation, java.lang.Class<?> type)
isModifiableClass
in interface AgentBuilder.RedefinitionStrategy.Dispatcher
instrumentation
- The instrumentation instance available.type
- The type to check for modifiability.true
if the supplied type is modifiable.public boolean isRetransformClassesSupported(java.lang.instrument.Instrumentation instrumentation)
isRetransformClassesSupported
in interface AgentBuilder.RedefinitionStrategy.Dispatcher
instrumentation
- The instrumentation instance available.true
if the supplied instance supports retransformation.public void retransformClasses(java.lang.instrument.Instrumentation instrumentation, java.lang.Class<?>[] type) throws java.lang.instrument.UnmodifiableClassException
retransformClasses
in interface AgentBuilder.RedefinitionStrategy.Dispatcher
instrumentation
- The instrumentation instance to use for retransformation.type
- The types to retransform.java.lang.instrument.UnmodifiableClassException
- If the supplied classes cannot be retransformed.