Enum Class Allocation

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

public enum Allocation extends Enum<Allocation>
Mechanisms creating instances without calling constructors, see ToolsetBuilder.allocation(Allocation...).
  • Enum Constant Details

    • REFLECTION_FACTORY

      public static final Allocation REFLECTION_FACTORY
      sun.reflect.ReflectionFactory of the jdk.unsupported module, the mechanism of deserialization: needs neither Unsafe, nor opened packages, nor additional libraries. JDK 28 refuses it for classes which are not serializable, unless started with -Djdk.reflect.allowNonSerializableConstruction=true: the next mechanism creates them.
    • UNSAFE

      public static final Allocation UNSAFE
      Unsafe.allocateInstance(), not a memory access method: the JVM does not warn about it.
  • Method Details

    • values

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