|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jcoderz.phoenix.report.Syntax
public class Syntax
Splits an input file into several tokens suitable for syntax highlighting. This class encapsulates the access to the jEdit syntax highlighter package. No jEdit related classes should be passed by interfaces of this class.
| Constructor Summary | |
|---|---|
Syntax(File in,
Charset charSet,
int tabWidth)
Initializes an Ascii2Html instance. |
|
| Method Summary | |
|---|---|
int |
getCurrentLineNumber()
The line number of the currently parsed token. |
int |
getCurrentLinePos()
Returns the cursor position of start of the current token. |
int |
getCurrentTokenLength()
Returns the length of the current reported token. |
String |
getCurrentTokenType()
Returns the current token type as string. |
int |
getNumberOfLines()
Returns the number of lines of the parsed file. |
String |
nextToken()
Parses the next token and returns its textual content as string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Syntax(File in,
Charset charSet,
int tabWidth)
throws IOException
in - the source file to read.charSet - the char set to use when reading the source file.
If null the platform default char set will be used.tabWidth - the tab width to use when calculating the cursor
position.
IOException - if a error occurs while reading the source file.| Method Detail |
|---|
public int getNumberOfLines()
public int getCurrentLineNumber()
nextToken() 0 is returned.
public int getCurrentLinePos()
public String getCurrentTokenType()
Token.tokenToString(byte).
For the Token.END null is returned.
public int getCurrentTokenLength()
public String nextToken()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||