public static enum ClassReloadingStrategy.Dispatcher.ForLegacyVm extends Enum<ClassReloadingStrategy.Dispatcher.ForLegacyVm> implements ClassReloadingStrategy.Dispatcher
ClassReloadingStrategy.Dispatcher.CreationAction, ClassReloadingStrategy.Dispatcher.ForJava6CapableVm, ClassReloadingStrategy.Dispatcher.ForLegacyVm
Enum Constant and Description |
---|
INSTANCE
The singleton instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addTransformer(Instrumentation instrumentation,
ClassFileTransformer classFileTransformer,
boolean canRetransform)
Registers a transformer.
|
boolean |
isModifiableClass(Instrumentation instrumentation,
Class<?> type)
Invokes the
Instrumentation#isModifiableClass method. |
boolean |
isRetransformClassesSupported(Instrumentation instrumentation)
Invokes the
Instrumentation#isRetransformClassesSupported method. |
void |
retransformClasses(Instrumentation instrumentation,
Class<?>[] type)
Retransforms the supplied classes.
|
static ClassReloadingStrategy.Dispatcher.ForLegacyVm |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ClassReloadingStrategy.Dispatcher.ForLegacyVm[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ClassReloadingStrategy.Dispatcher.ForLegacyVm INSTANCE
public static ClassReloadingStrategy.Dispatcher.ForLegacyVm[] values()
for (ClassReloadingStrategy.Dispatcher.ForLegacyVm c : ClassReloadingStrategy.Dispatcher.ForLegacyVm.values()) System.out.println(c);
public static ClassReloadingStrategy.Dispatcher.ForLegacyVm valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean isModifiableClass(Instrumentation instrumentation, 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(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(Instrumentation instrumentation, 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(Instrumentation instrumentation, Class<?>[] type)
retransformClasses
in interface ClassReloadingStrategy.Dispatcher
instrumentation
- The instrumentation instance to invoke the method on.type
- The types to retransform.Copyright © 2014–2020. All rights reserved.