Package net.bytebuddy.dynamic.loading
Enum ClassReloadingStrategy.Dispatcher.ForLegacyVm
- java.lang.Object
-
- java.lang.Enum<ClassReloadingStrategy.Dispatcher.ForLegacyVm>
-
- net.bytebuddy.dynamic.loading.ClassReloadingStrategy.Dispatcher.ForLegacyVm
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ClassReloadingStrategy.Dispatcher.ForLegacyVm>
,ClassReloadingStrategy.Dispatcher
- Enclosing interface:
- ClassReloadingStrategy.Dispatcher
public static enum ClassReloadingStrategy.Dispatcher.ForLegacyVm extends java.lang.Enum<ClassReloadingStrategy.Dispatcher.ForLegacyVm> implements ClassReloadingStrategy.Dispatcher
A dispatcher for a legacy VM that does not support retransformation.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.loading.ClassReloadingStrategy.Dispatcher
ClassReloadingStrategy.Dispatcher.CreationAction, ClassReloadingStrategy.Dispatcher.ForJava6CapableVm, ClassReloadingStrategy.Dispatcher.ForLegacyVm
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
The singleton instance.
-
Constructor Summary
Constructors Modifier Constructor Description private
ForLegacyVm()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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 theInstrumentation#isModifiableClass
method.boolean
isRetransformClassesSupported(java.lang.instrument.Instrumentation instrumentation)
Invokes theInstrumentation#isRetransformClassesSupported
method.void
retransformClasses(java.lang.instrument.Instrumentation instrumentation, java.lang.Class<?>[] type)
Retransforms the supplied classes.static ClassReloadingStrategy.Dispatcher.ForLegacyVm
valueOf(java.lang.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.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final ClassReloadingStrategy.Dispatcher.ForLegacyVm INSTANCE
The singleton instance.
-
-
Method Detail
-
values
public static ClassReloadingStrategy.Dispatcher.ForLegacyVm[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ClassReloadingStrategy.Dispatcher.ForLegacyVm c : ClassReloadingStrategy.Dispatcher.ForLegacyVm.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ClassReloadingStrategy.Dispatcher.ForLegacyVm valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
isModifiableClass
public boolean isModifiableClass(java.lang.instrument.Instrumentation instrumentation, java.lang.Class<?> type)
Invokes theInstrumentation#isModifiableClass
method.- Specified by:
isModifiableClass
in interfaceClassReloadingStrategy.Dispatcher
- Parameters:
instrumentation
- The instrumentation instance to invoke the method on.type
- The type to consider for modifiability.- Returns:
true
if the supplied type can be modified.
-
isRetransformClassesSupported
public boolean isRetransformClassesSupported(java.lang.instrument.Instrumentation instrumentation)
Invokes theInstrumentation#isRetransformClassesSupported
method.- Specified by:
isRetransformClassesSupported
in interfaceClassReloadingStrategy.Dispatcher
- Parameters:
instrumentation
- The instrumentation instance to invoke the method on.- Returns:
true
if the supplied instrumentation instance supports retransformation.
-
addTransformer
public void addTransformer(java.lang.instrument.Instrumentation instrumentation, java.lang.instrument.ClassFileTransformer classFileTransformer, boolean canRetransform)
Registers a transformer.- Specified by:
addTransformer
in interfaceClassReloadingStrategy.Dispatcher
- Parameters:
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.
-
retransformClasses
public void retransformClasses(java.lang.instrument.Instrumentation instrumentation, java.lang.Class<?>[] type)
Retransforms the supplied classes.- Specified by:
retransformClasses
in interfaceClassReloadingStrategy.Dispatcher
- Parameters:
instrumentation
- The instrumentation instance to invoke the method on.type
- The types to retransform.
-
-