org.apache.torque.engine.sql
Class Token

java.lang.Object
  extended by org.apache.torque.engine.sql.Token

public class Token
extends Object

A single token returned by SQLScanner. This class is used internally by SQLScanner and you should probably never need to create objects of this class unless you are working on SQLScanner.

Version:
$Id: Token.java,v 1.1 2007-10-21 07:57:27 abyrne Exp $
Author:
Leon Messerschmidt

Field Summary
private  int col
          column number
private  int line
          line number
private  String str
          string representation
 
Constructor Summary
Token(String str)
          Creates a new token without positioning.
Token(String str, int line, int col)
          Creates a new token with positioning settings.
 
Method Summary
 int getCol()
          Get the column number of this token.
 int getLine()
          Get the line number of this token.
 String getStr()
          Returns the string representation of this token.
 String toString()
          The same as getStr()
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

str

private String str
string representation


line

private int line
line number


col

private int col
column number

Constructor Detail

Token

public Token(String str)
Creates a new token without positioning.

Parameters:
str - string representation

Token

public Token(String str,
             int line,
             int col)
Creates a new token with positioning settings.

Parameters:
str - string representation
line - line number
col - column number
Method Detail

getStr

public String getStr()
Returns the string representation of this token.

Returns:
the string representation

getLine

public int getLine()
Get the line number of this token.

Returns:
the line number

getCol

public int getCol()
Get the column number of this token.

Returns:
the column number

toString

public String toString()
The same as getStr()

Overrides:
toString in class Object
Returns:
the string representation


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.