de.zeigermann.xpa.tokenParser
Class XMLToken

java.lang.Object
  |
  +--antlr.Token
        |
        +--antlr.CommonToken
              |
              +--de.zeigermann.xpa.tokenParser.XMLToken
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
XMLEndToken, XMLStartToken

public class XMLToken
extends CommonToken

The XMLToken class is the basic class to represent ANTLR tokens that contain XML data. If not inherited this class normally represents a text object.


Field Summary
 
Fields inherited from class antlr.CommonToken
col, line, text
 
Fields inherited from class antlr.Token
badToken, EOF_TYPE, INVALID_TYPE, MIN_USER_TYPE, NULL_TREE_LOOKAHEAD, SKIP
 
Constructor Summary
XMLToken(int type, String text)
          Creates a new XML token.
 
Method Summary
 String getFilename()
          Gets the file from which this token originally was generated or null if unknown or not applicable.
 void setFilename(String fileName)
          Sets the file from which this token originally was generated.
 String toString()
          Gets a simple string representation of this token.
 
Methods inherited from class antlr.CommonToken
getColumn, getLine, getText, setColumn, setLine, setText
 
Methods inherited from class antlr.Token
getType, setType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XMLToken

public XMLToken(int type,
                String text)
Creates a new XML token.

Parameters:
type - the type of the token, usually the type of XMLTokenTypeManager.PCDATA.
text - of the token
Method Detail

getFilename

public String getFilename()
Gets the file from which this token originally was generated or null if unknown or not applicable.

Overrides:
getFilename in class Token
See Also:
setFilename(java.lang.String)

setFilename

public void setFilename(String fileName)
Sets the file from which this token originally was generated.

Overrides:
setFilename in class Token
See Also:
getFilename()

toString

public String toString()
Gets a simple string representation of this token. Not intended for writing back to XML.

Overrides:
toString in class CommonToken


Copyright © 1999-2003 Oliver Zeigermann. All Rights Reserved.