jbet
Class Token

java.lang.Object
  extended by jbet.Token

public class Token
extends java.lang.Object

The Token class. This file contains fields that hold tokens (type, value), and code that constructs different types of tokens or converts tokens into strings. $Id: Token.java,v 1.4 2003/09/09 17:31:54 areisse Exp $


Field Summary
 double d
           
static int DEFAULT
           
static int DESCRIPTOR
           
static int DONOR
           
static int END_OF_OPTS
           
static int EOF
           
static int EOL
           
static int FLOAT
           
static int INT
           
 long l
           
static int LABEL
           
static int NAME
           
static int STRING
           
static int TAG
           
 java.lang.String text
           
 int type
           
static int TYPE
           
 
Constructor Summary
Token(int t)
          Constructor.
Token(int t, double s)
          Constructor.
Token(int t, long s)
          Constructor.
Token(int t, java.lang.String s)
          Constructor.
 
Method Summary
 java.lang.String toString()
          Return a string rep.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

type

public int type

text

public java.lang.String text

l

public long l

d

public double d

EOF

public static final int EOF
See Also:
Constant Field Values

TAG

public static final int TAG
See Also:
Constant Field Values

NAME

public static final int NAME
See Also:
Constant Field Values

END_OF_OPTS

public static final int END_OF_OPTS
See Also:
Constant Field Values

TYPE

public static final int TYPE
See Also:
Constant Field Values

DEFAULT

public static final int DEFAULT
See Also:
Constant Field Values

DONOR

public static final int DONOR
See Also:
Constant Field Values

DESCRIPTOR

public static final int DESCRIPTOR
See Also:
Constant Field Values

STRING

public static final int STRING
See Also:
Constant Field Values

INT

public static final int INT
See Also:
Constant Field Values

LABEL

public static final int LABEL
See Also:
Constant Field Values

FLOAT

public static final int FLOAT
See Also:
Constant Field Values

EOL

public static final int EOL
See Also:
Constant Field Values
Constructor Detail

Token

public Token(int t)
Constructor. Used for EOF, END_OF_OPTS, EOL and opt token type creation.


Token

public Token(int t,
             java.lang.String s)
Constructor. Used for TAG, NAME, STRING, DESCRIPTOR, TYPE, and LABEL token type creation.


Token

public Token(int t,
             long s)
Constructor. Used for INT token type creation.


Token

public Token(int t,
             double s)
Constructor. Used for FLOAT token type creation.

Method Detail

toString

public java.lang.String toString()
Return a string rep.

Overrides:
toString in class java.lang.Object
Returns:
printable string