Enum Class CmdToken.Type

java.lang.Object
java.lang.Enum<CmdToken.Type>
com.j3d.engine.interact.cmd.CmdToken.Type
All Implemented Interfaces:
Serializable, Comparable<CmdToken.Type>, Constable
Enclosing class:
CmdToken

public static enum CmdToken.Type extends Enum<CmdToken.Type>
Defines the possible types a command token can represent. Each type is associated with a Java class and a usage string for help messages.
  • Enum Constant Details

  • Field Details

    • clazz

      private Class<?> clazz
      The Java class that this token type maps to.
    • usage

      private String usage
      A short string for usage hints.
  • Constructor Details

    • Type

      private Type(Class<?> clazz, String usage)
      Constructs a Type enum constant.
      Parameters:
      clazz - The Java class associated with this token type.
      usage - A short string describing the usage of this type, often used in help messages.
  • Method Details

    • values

      public static CmdToken.Type[] 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 CmdToken.Type 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
    • getTypeClass

      public Class<?> getTypeClass()
      Returns the Java class associated with this token type.
      Returns:
      The Class object.
    • toUsage

      public String toUsage()
      Returns a short usage string for this token type.
      Returns:
      The usage string.