Enum Class TokenType

java.lang.Object
java.lang.Enum<TokenType>
org.gnome.glib.TokenType
All Implemented Interfaces:
Serializable, Comparable<TokenType>, Constable, Enumeration

@Generated("org.javagi.JavaGI") public enum TokenType extends Enum<TokenType> implements Enumeration
The possible types of token returned from each g_scanner_get_next_token() call.
  • Enum Constant Details

    • EOF

      public static final TokenType EOF
      the end of the file
    • LEFT_PAREN

      public static final TokenType LEFT_PAREN
      a '(' character
    • RIGHT_PAREN

      public static final TokenType RIGHT_PAREN
      a ')' character
    • LEFT_CURLY

      public static final TokenType LEFT_CURLY
      a '{' character
    • RIGHT_CURLY

      public static final TokenType RIGHT_CURLY
      a '}' character
    • LEFT_BRACE

      public static final TokenType LEFT_BRACE
      a '[' character
    • RIGHT_BRACE

      public static final TokenType RIGHT_BRACE
      a ']' character
    • EQUAL_SIGN

      public static final TokenType EQUAL_SIGN
      a '=' character
    • COMMA

      public static final TokenType COMMA
      a ',' character
    • NONE

      public static final TokenType NONE
      not a token
    • ERROR

      public static final TokenType ERROR
      an error occurred
    • CHAR

      public static final TokenType CHAR
      a character
    • BINARY

      public static final TokenType BINARY
      a binary integer
    • OCTAL

      public static final TokenType OCTAL
      an octal integer
    • INT

      public static final TokenType INT
      an integer
    • HEX

      public static final TokenType HEX
      a hex integer
    • FLOAT

      public static final TokenType FLOAT
      a floating point number
    • STRING

      public static final TokenType STRING
      a string
    • SYMBOL

      public static final TokenType SYMBOL
      a symbol
    • IDENTIFIER

      public static final TokenType IDENTIFIER
      an identifier
    • IDENTIFIER_NULL

      public static final TokenType IDENTIFIER_NULL
      a null identifier
    • COMMENT_SINGLE

      public static final TokenType COMMENT_SINGLE
      one line comment
    • COMMENT_MULTI

      public static final TokenType COMMENT_MULTI
      multi line comment
  • Method Details

    • values

      public static TokenType[] 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 TokenType 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
    • of

      public static TokenType of(int value)
      Create a new TokenType for the provided value
      Parameters:
      value - the enum value
      Returns:
      the enum for the provided value
    • getValue

      public int getValue()
      Get the numeric value of this enum
      Specified by:
      getValue in interface Enumeration
      Returns:
      the enum value
    • of

      public static TokenType of(MemorySegment address)
      Create a new TokenType for the value in the provided memory address.
      Parameters:
      address - the memory address holding a enum value
      Returns:
      the enum for the value in the provided memory address