org.apache.torque.engine.sql
Class Token

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

public class Token
extends java.lang.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 473814 2006-11-11 22:30:30Z tv $
Author:
Leon Messerschmidt

Constructor Summary
Token(java.lang.String str)
          Creates a new token without positioning.
Token(java.lang.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.
 java.lang.String getStr()
          Returns the string representation of this token.
 java.lang.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(java.lang.String str)
Creates a new token without positioning.

Parameters:
str - string representation

Token

public Token(java.lang.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 java.lang.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 java.lang.String toString()
The same as getStr()

Overrides:
toString in class java.lang.Object
Returns:
the string representation


Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.