- All Implemented Interfaces:
Serializable,Comparable<ModuleOpening>,Constable
Mechanisms opening packages of other modules to the cloner for reflection, JDK 9+; on JDK 8 there is nothing to open.
See
ToolsetBuilder.moduleOpening(ModuleOpening).-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionOpens packages withInstrumentationof the cloner agent, the JVM must be started with-javaagentpointing to the cloner jar.Narcissus library, which must be on the classpath: makes the members the cloner uses accessible directly (JNI), without opening packages or changing modules.Packages are not opened, only those opened by the JVM options (--add-opens) are accessible.Opens packages withUnsafe. -
Method Summary
Modifier and TypeMethodDescriptionstatic ModuleOpeningReturns the enum constant of this class with the specified name.static ModuleOpening[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
Packages are not opened, only those opened by the JVM options (--add-opens) are accessible. -
UNSAFE
Opens packages withUnsafe. Changes the module of an internal class of the cloner, use with care. -
NARCISSUS
Narcissus library, which must be on the classpath: makes the members the cloner uses accessible directly (JNI), without opening packages or changing modules. Narcissus loads a native library: since JDK 24 the JVM warns about it unless started with--enable-native-access=ALL-UNNAMED(or the module of Narcissus), a future JDK will deny it. -
INSTRUMENTATION
Opens packages withInstrumentationof the cloner agent, the JVM must be started with-javaagentpointing to the cloner jar.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-