org.metasyntactic.tool.codecounter
Class JavaSourceToken

java.lang.Object
  |
  +--org.metasyntactic.tool.codecounter.JavaSourceToken

public class JavaSourceToken
extends java.lang.Object

JavaSourceToken --- A record for holding Token information. This is a helper data structure for JavaSourceTokenStream. Clients should never manipulate this data structure explicitly; they should use only the JavaSourceTokenStream interface.


Field Summary
 boolean hasCode
          If isEol is true, then hasCode records if this line has code on it.
 boolean isEof
          True if this token represents end-of-file.
 boolean isEol
          True if this token represents end-of-line.
 java.lang.String tokenString
          The string value of this token, or a blank if it's nonprinting.
 
Constructor Summary
JavaSourceToken(boolean isEof, boolean isEol, boolean hasCode, java.lang.String tokenString)
          Constructs a new JavaSourceToken.
 
Method Summary
 java.lang.String toString()
          Returns a string representing the JavaSourceToken.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

isEof

public boolean isEof
True if this token represents end-of-file.


isEol

public boolean isEol
True if this token represents end-of-line.


hasCode

public boolean hasCode
If isEol is true, then hasCode records if this line has code on it.


tokenString

public java.lang.String tokenString
The string value of this token, or a blank if it's nonprinting.

Constructor Detail

JavaSourceToken

public JavaSourceToken(boolean isEof,
                       boolean isEol,
                       boolean hasCode,
                       java.lang.String tokenString)
Constructs a new JavaSourceToken.

Parameters:
isEof - True if this token represents the end-of-file.
isEol - True if this token represents the end-of-line.
hasCode - True if this token represents the end-of-line and code appeared on this line.
tokenString - A string containing the token.
Method Detail

toString

public java.lang.String toString()
Returns a string representing the JavaSourceToken.

Overrides:
toString in class java.lang.Object