org.eclipse.mylar.internal.monitor.usage
Class HtmlStreamTokenizer.Token

java.lang.Object
  extended by org.eclipse.mylar.internal.monitor.usage.HtmlStreamTokenizer.Token
Enclosing class:
HtmlStreamTokenizer

public static class HtmlStreamTokenizer.Token
extends java.lang.Object

Class for current token.


Nested Class Summary
private static class HtmlStreamTokenizer.Token.Type
          Private enum class for token type.
 
Field Summary
static HtmlStreamTokenizer.Token.Type COMMENT
           
static HtmlStreamTokenizer.Token.Type EOF
           
static HtmlStreamTokenizer.Token.Type TAG
           
static HtmlStreamTokenizer.Token.Type TEXT
           
private  HtmlStreamTokenizer.Token.Type type
          token's type
private  java.lang.Object value
          token's value
private  java.lang.StringBuffer whitespace
          whitespace preceding the token
 
Constructor Summary
protected HtmlStreamTokenizer.Token()
          Constructor for the EOF token.
protected HtmlStreamTokenizer.Token(HtmlTag tag, java.lang.StringBuffer whitespace)
          Constructor for the HTML tag tokens.
protected HtmlStreamTokenizer.Token(java.lang.StringBuffer text, java.lang.StringBuffer whitespace, boolean comment)
          Constructor for regular text and comments.
 
Method Summary
 HtmlStreamTokenizer.Token.Type getType()
          Returns the token's type.
 java.lang.Object getValue()
          Returns the token's value.
 java.lang.StringBuffer getWhitespace()
          Returns the whitespace preceding the token.
 java.lang.String toString()
          Returns the string representation of the token, including the preceding whitespace.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EOF

public static final HtmlStreamTokenizer.Token.Type EOF

TEXT

public static final HtmlStreamTokenizer.Token.Type TEXT

TAG

public static final HtmlStreamTokenizer.Token.Type TAG

COMMENT

public static final HtmlStreamTokenizer.Token.Type COMMENT

type

private HtmlStreamTokenizer.Token.Type type
token's type


value

private java.lang.Object value
token's value


whitespace

private java.lang.StringBuffer whitespace
whitespace preceding the token

Constructor Detail

HtmlStreamTokenizer.Token

protected HtmlStreamTokenizer.Token()
Constructor for the EOF token.


HtmlStreamTokenizer.Token

protected HtmlStreamTokenizer.Token(HtmlTag tag,
                                    java.lang.StringBuffer whitespace)
Constructor for the HTML tag tokens.


HtmlStreamTokenizer.Token

protected HtmlStreamTokenizer.Token(java.lang.StringBuffer text,
                                    java.lang.StringBuffer whitespace,
                                    boolean comment)
Constructor for regular text and comments.

Method Detail

getType

public HtmlStreamTokenizer.Token.Type getType()
Returns the token's type.


getWhitespace

public java.lang.StringBuffer getWhitespace()
Returns the whitespace preceding the token.


getValue

public java.lang.Object getValue()
Returns the token's value. This is an HtmlTag for tokens of type TAG and a StringBuffer for tokens of type TEXT and COMMENT. For tokens of type EOF, the value is null.


toString

public java.lang.String toString()
Returns the string representation of the token, including the preceding whitespace.

Overrides:
toString in class java.lang.Object