de.zeigermann.xpa.tokenParser
Class XMLStartToken

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

public class XMLStartToken
extends XMLToken

This class stores XML start tags as ANTLR tokens. Associated attributes are stored as AttributesImpl objects. The implementation was preferred over the interface to have modification options.


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
XMLStartToken(int type, String tag, AttributesImpl attributes)
          Creates a new XML token representing an XML start tag.
 
Method Summary
 AttributesImpl getAttributes()
          Gets attributes associated to this tag.
 String toString()
          Gets a simple string representation of this token.
 
Methods inherited from class de.zeigermann.xpa.tokenParser.XMLToken
getFilename, setFilename
 
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

XMLStartToken

public XMLStartToken(int type,
                     String tag,
                     AttributesImpl attributes)
Creates a new XML token representing an XML start tag.

Parameters:
type - the type of the token, usually determined by Parser2XMLTokenStreamAdapter using XMLTokenTypeManager.getType(java.lang.String).
tag - name of this start tag
attributes - attributes associated to this tag
See Also:
getAttributes()
Method Detail

getAttributes

public AttributesImpl getAttributes()
Gets attributes associated to this tag.


toString

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

Overrides:
toString in class XMLToken


Copyright 1999-2003 Oliver Zeigermann. All Rights Reserved.