org.exolab.castor.jdo.oql
Class Token

java.lang.Object
  extended by org.exolab.castor.jdo.oql.Token
All Implemented Interfaces:
TokenTypes

public class Token
extends java.lang.Object
implements TokenTypes

Represents tokens which are generated by the Lexer from the String OQL representation. Tokens contain a token type and the string value.

Version:
$Revision: 1.1.1.1 $ $Date: 2003/03/03 07:08:25 $
Author:
Nissim Karpenstein

Field Summary
 
Fields inherited from interface org.exolab.castor.jdo.oql.TokenTypes
ARROW, BOOLEAN_LITERAL, CHAR_LITERAL, COLON, COMMA, CONCAT, DATE_LITERAL, DIVIDE, DOLLAR, DOT, DOUBLE_LITERAL, END_OF_QUERY, EQUAL, GT, GTE, IDENTIFIER, KEYWORD_ABS, KEYWORD_AND, KEYWORD_AS, KEYWORD_ASC, KEYWORD_AVG, KEYWORD_BETWEEN, KEYWORD_BY, KEYWORD_COUNT, KEYWORD_DESC, KEYWORD_DISTINCT, KEYWORD_FROM, KEYWORD_IN, KEYWORD_IS_DEFINED, KEYWORD_IS_UNDEFINED, KEYWORD_LIKE, KEYWORD_LIMIT, KEYWORD_LIST, KEYWORD_MAX, KEYWORD_MIN, KEYWORD_MOD, KEYWORD_NIL, KEYWORD_NOT, KEYWORD_OFFSET, KEYWORD_OR, KEYWORD_ORDER, KEYWORD_SELECT, KEYWORD_SUM, KEYWORD_UNDEFINED, KEYWORD_WHERE, LONG_LITERAL, LPAREN, LT, LTE, MINUS, NOT_EQUAL, PLUS, RPAREN, STRING_LITERAL, TIME_LITERAL, TIMES, TIMESTAMP_LITERAL
 
Constructor Summary
Token(int tokenType, java.lang.String tokenValue)
          Creates a new Token with the supplied type and value.
 
Method Summary
 int getTokenType()
          Token Type accessor method.
 java.lang.String getTokenValue()
          Token value accessor method.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Token

public Token(int tokenType,
             java.lang.String tokenValue)
Creates a new Token with the supplied type and value.

Parameters:
tokenType - The Token Type for this token
tokenValue - The Token Value for this token
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getTokenType

public int getTokenType()
Token Type accessor method.

Returns:
The Token Type for this token

getTokenValue

public java.lang.String getTokenValue()
Token value accessor method.

Returns:
The Token Value for this token


Intalio Inc. (C) 1999-2004. All rights reserved http://www.intalio.com