Enum Class Instantiate

java.lang.Object
java.lang.Enum<Instantiate>
de.craftsblock.craftsnet.autoregister.meta.Instantiate
All Implemented Interfaces:
Serializable, Comparable<Instantiate>, Constable

public enum Instantiate extends Enum<Instantiate>
The Instantiate enum defines the different ways an instance of a class can be managed during the auto registration process.

This enum is primarily used to determine whether a new instance should be created every time the class is accessed or whether the same instance should be reused.

Since:
3.3.2-SNAPSHOT
  • Enum Constant Details

    • SAME

      public static final Instantiate SAME
      Indicates that the same instance of the class should be reused.
    • NEW

      public static final Instantiate NEW
      Indicates that a new instance of the class should be created each time it is accessed.
  • Method Details

    • values

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