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

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
 

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-2013 The Kuali Foundation. All Rights Reserved.