Enum Class ModuleOpening

java.lang.Object
java.lang.Enum<ModuleOpening>
io.github.sugarcubes.cloner.ModuleOpening
All Implemented Interfaces:
Serializable, Comparable<ModuleOpening>, Constable

public enum ModuleOpening extends Enum<ModuleOpening>
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).
  • Enum Constant Details

    • NONE

      public static final ModuleOpening NONE
      Packages are not opened, only those opened by the JVM options (--add-opens) are accessible.
    • UNSAFE

      public static final ModuleOpening UNSAFE
      Opens packages with Unsafe. Changes the module of an internal class of the cloner, use with care.
    • NARCISSUS

      public static final ModuleOpening 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

      public static final ModuleOpening INSTRUMENTATION
      Opens packages with Instrumentation of the cloner agent, the JVM must be started with -javaagent pointing to the cloner jar.
  • Method Details

    • values

      public static ModuleOpening[] 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

      public static ModuleOpening valueOf(String name)
      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 name
      NullPointerException - if the argument is null