public static class ClassReloadingStrategy.Dispatcher.ForJava6CapableVm extends java.lang.Object implements ClassReloadingStrategy.Dispatcher
ClassReloadingStrategy.Dispatcher.CreationAction, ClassReloadingStrategy.Dispatcher.ForJava6CapableVm, ClassReloadingStrategy.Dispatcher.ForLegacyVm
Modifier and Type | Field and Description |
---|---|
private java.lang.reflect.Method |
addTransformer
The
Instrumentation#addTransformer method. |
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 addTransformer,
java.lang.reflect.Method retransformClasses)
Creates a dispatcher for a Java 6 compatible VM.
|
Modifier and Type | Method and Description |
---|---|
void |
addTransformer(java.lang.instrument.Instrumentation instrumentation,
java.lang.instrument.ClassFileTransformer classFileTransformer,
boolean canRetransform)
Registers a transformer.
|
boolean |
isModifiableClass(java.lang.instrument.Instrumentation instrumentation,
java.lang.Class<?> type)
Invokes the
Instrumentation#isModifiableClass method. |
boolean |
isRetransformClassesSupported(java.lang.instrument.Instrumentation instrumentation)
Invokes the
Instrumentation#isRetransformClassesSupported method. |
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 addTransformer
Instrumentation#addTransformer
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 addTransformer, java.lang.reflect.Method retransformClasses)
isModifiableClass
- The Instrumentation#isModifiableClass
method.isRetransformClassesSupported
- The Instrumentation#isRetransformClassesSupported
method.addTransformer
- The Instrumentation#addTransformer
method.retransformClasses
- The Instrumentation#retransformClasses
method.public boolean isModifiableClass(java.lang.instrument.Instrumentation instrumentation, java.lang.Class<?> type)
Instrumentation#isModifiableClass
method.isModifiableClass
in interface ClassReloadingStrategy.Dispatcher
instrumentation
- The instrumentation instance to invoke the method on.type
- The type to consider for modifiability.true
if the supplied type can be modified.public boolean isRetransformClassesSupported(java.lang.instrument.Instrumentation instrumentation)
Instrumentation#isRetransformClassesSupported
method.isRetransformClassesSupported
in interface ClassReloadingStrategy.Dispatcher
instrumentation
- The instrumentation instance to invoke the method on.true
if the supplied instrumentation instance supports retransformation.public void addTransformer(java.lang.instrument.Instrumentation instrumentation, java.lang.instrument.ClassFileTransformer classFileTransformer, boolean canRetransform)
addTransformer
in interface ClassReloadingStrategy.Dispatcher
instrumentation
- The instrumentation instance to invoke the method on.classFileTransformer
- The class file transformer to register.canRetransform
- true
if the class file transformer should be invoked upon a retransformation.public void retransformClasses(java.lang.instrument.Instrumentation instrumentation, java.lang.Class<?>[] type) throws java.lang.instrument.UnmodifiableClassException
retransformClasses
in interface ClassReloadingStrategy.Dispatcher
instrumentation
- The instrumentation instance to invoke the method on.type
- The types to retransform.java.lang.instrument.UnmodifiableClassException
- If any of the supplied types are unmodifiable.