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.
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.
|
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
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.