org.jcoderz.phoenix.sqlparser
Class TokenType

java.lang.Object
  extended by org.jcoderz.phoenix.sqlparser.TokenType
All Implemented Interfaces:
Serializable

public final class TokenType
extends Object
implements Serializable

Enumerated type of a token type. Instances of this class are immutable. The following token types are defined:

Author:
Michael Griffel
See Also:
Serialized Form

Field Summary
static TokenType ALTER
          The token type alter.
static TokenType BITMAP
          The token type bitmap.
static TokenType BY
           
static TokenType CACHE
           
static TokenType CASCADE
          The token type cascade.
static TokenType CHECK
          The token type check.
static TokenType CLOSE_PAREN
          The token type close_paren.
static TokenType COMMA
          The token type comma.
static TokenType COMMENT
          The token type comment.
static TokenType CONSTRAINT
          The token type constraint.
static TokenType CREATE
          The token type create.
static TokenType CYCLE
           
static TokenType DEFAULT
          The token type default.
static TokenType DELETE
          The token type delete.
static TokenType DISABLE
          The token type disable.
static TokenType DROP
          The token type drop.
static TokenType ENABLE
          The token type enable.
static TokenType EOF
          The token type eof.
static TokenType FOREIGN
          The token type foreign.
static TokenType IDENTIFIER
          The token type identifier.
static TokenType IN
          The token type in.
static TokenType INCREMENT
          The token type increment.
static TokenType INDEX
          The token type index.
static TokenType INSERT
          The token type insert.
static TokenType KEY
          The token type key.
static TokenType MAXVALUE
           
static TokenType MINVALUE
           
static TokenType NEWLINE
          The token type newline.
static TokenType NOCACHE
           
static TokenType NOCYCLE
           
static TokenType NOMAXVALUE
           
static TokenType NOMINVALUE
           
static TokenType NOORDER
           
static TokenType NOT
          The token type not.
static TokenType NULL
          The token type null.
static TokenType NUMERIC_LITERAL
          The token type numeric_literal.
static TokenType ON
          The token type on.
static TokenType OPEN_PAREN
          The token type open_paren.
static TokenType OPERATOR
           
static TokenType ORDER
           
static TokenType PRIMARY
          The token type primary.
static TokenType REFERENCES
          The token type references.
static TokenType SELECT
          The token type delete.
static TokenType SEMICOLON
          The token type semicolon.
static TokenType SEQUENCE
          The token type sequence.
static TokenType SET
          The token type set.
static TokenType SLASH
          The token type slash.
static TokenType START
           
static TokenType STRING_LITERAL
          The token type string_literal.
static TokenType TABLE
          The token type table.
static TokenType UNIQUE
          The token type unique.
static List VALUES
          Immutable list of the token types.
static TokenType WHITESPACE
          The token type whitespace.
static TokenType WITH
           
 
Method Summary
static TokenType fromInt(int i)
          Creates a TokenType object from its int representation.
static TokenType fromString(String str)
          Creates a TokenType object from its String representation.
 int toInt()
          Returns the int representation of this token type.
 String toString()
          Returns the String representation of this token type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CREATE

public static final TokenType CREATE
The token type create.


TABLE

public static final TokenType TABLE
The token type table.


OPEN_PAREN

public static final TokenType OPEN_PAREN
The token type open_paren.


CLOSE_PAREN

public static final TokenType CLOSE_PAREN
The token type close_paren.


IDENTIFIER

public static final TokenType IDENTIFIER
The token type identifier.


COMMA

public static final TokenType COMMA
The token type comma.


SEMICOLON

public static final TokenType SEMICOLON
The token type semicolon.


SLASH

public static final TokenType SLASH
The token type slash.


WHITESPACE

public static final TokenType WHITESPACE
The token type whitespace.


NEWLINE

public static final TokenType NEWLINE
The token type newline.


STRING_LITERAL

public static final TokenType STRING_LITERAL
The token type string_literal.


NUMERIC_LITERAL

public static final TokenType NUMERIC_LITERAL
The token type numeric_literal.


COMMENT

public static final TokenType COMMENT
The token type comment.


NOT

public static final TokenType NOT
The token type not.


NULL

public static final TokenType NULL
The token type null.


CONSTRAINT

public static final TokenType CONSTRAINT
The token type constraint.


PRIMARY

public static final TokenType PRIMARY
The token type primary.


KEY

public static final TokenType KEY
The token type key.


UNIQUE

public static final TokenType UNIQUE
The token type unique.


CHECK

public static final TokenType CHECK
The token type check.


IN

public static final TokenType IN
The token type in.


EOF

public static final TokenType EOF
The token type eof.


FOREIGN

public static final TokenType FOREIGN
The token type foreign.


DEFAULT

public static final TokenType DEFAULT
The token type default.


REFERENCES

public static final TokenType REFERENCES
The token type references.


ON

public static final TokenType ON
The token type on.


DELETE

public static final TokenType DELETE
The token type delete.


SET

public static final TokenType SET
The token type set.


CASCADE

public static final TokenType CASCADE
The token type cascade.


ENABLE

public static final TokenType ENABLE
The token type enable.


DISABLE

public static final TokenType DISABLE
The token type disable.


ALTER

public static final TokenType ALTER
The token type alter.


DROP

public static final TokenType DROP
The token type drop.


INSERT

public static final TokenType INSERT
The token type insert.


SELECT

public static final TokenType SELECT
The token type delete.


INDEX

public static final TokenType INDEX
The token type index.


BITMAP

public static final TokenType BITMAP
The token type bitmap.


SEQUENCE

public static final TokenType SEQUENCE
The token type sequence.


INCREMENT

public static final TokenType INCREMENT
The token type increment.


BY

public static final TokenType BY

START

public static final TokenType START

WITH

public static final TokenType WITH

MAXVALUE

public static final TokenType MAXVALUE

NOMAXVALUE

public static final TokenType NOMAXVALUE

MINVALUE

public static final TokenType MINVALUE

NOMINVALUE

public static final TokenType NOMINVALUE

CYCLE

public static final TokenType CYCLE

NOCYCLE

public static final TokenType NOCYCLE

CACHE

public static final TokenType CACHE

NOCACHE

public static final TokenType NOCACHE

ORDER

public static final TokenType ORDER

NOORDER

public static final TokenType NOORDER

OPERATOR

public static final TokenType OPERATOR

VALUES

public static final List VALUES
Immutable list of the token types.

Method Detail

fromInt

public static TokenType fromInt(int i)
                         throws IllegalArgumentException
Creates a TokenType object from its int representation.

Parameters:
i - the int representation of the token type to be returned.
Returns:
the TokenType object represented by this int.
Throws:
IllegalArgumentException - If the assigned int value isn't listed in the internal token type table

fromString

public static TokenType fromString(String str)
                            throws IllegalArgumentException
Creates a TokenType object from its String representation.

Parameters:
str - the str representation of the token type to be returned.
Returns:
the TokenType object represented by this str.
Throws:
IllegalArgumentException - If the given str value isn't listed in the internal token type table.

toInt

public int toInt()
Returns the int representation of this token type.

Returns:
the int representation of this token type.

toString

public String toString()
Returns the String representation of this token type.

Overrides:
toString in class Object
Returns:
the String representation of this token type.


Copyright 2007 The jCoderZ Project.