Class CstChar

All Implemented Interfaces:
TypeBearer, ToHuman, Comparable<Constant>

public final class CstChar extends CstLiteral32
Constants of type char.
  • Field Details

    • VALUE_0

      public static final CstChar VALUE_0
      non-null; the value 0 as an instance of this class
  • Method Details

    • make

      public static CstChar make(char value)
      Makes an instance for the given value. This may (but does not necessarily) return an already-allocated instance.
      Parameters:
      value - the char value
    • make

      public static CstChar make(int value)
      Makes an instance for the given int value. This may (but does not necessarily) return an already-allocated instance.
      Parameters:
      value - the value, which must be in range for a char
      Returns:
      non-null; the appropriate instance
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getType

      public Type getType()
      Gets the type associated with this instance.
      Returns:
      non-null; the type
    • typeName

      public String typeName()
      Returns the human name for the particular type of constant this instance is.
      Specified by:
      typeName in class Constant
      Returns:
      non-null; the name
    • toHuman

      public String toHuman()
      Return the "human" string form of this instance. This is generally less "debuggy" than toString().
      Returns:
      non-null; the human string form
    • getValue

      public char getValue()
      Gets the char value.
      Returns:
      the value