|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jwo.utils.syntaxhighlighter.Scanner jwo.utils.syntaxhighlighter.JavaScanner
public class JavaScanner
A Java language scanner that highlights Java keywords, syntax etc.
Field Summary |
---|
Fields inherited from class jwo.utils.syntaxhighlighter.Scanner |
---|
buffer, end, start, state, symbolTable |
Fields inherited from interface jwo.utils.syntaxhighlighter.TokenTypes |
---|
BRACKET, CHARACTER, COMMENT, END_COMMENT, END_TAG, IDENTIFIER, KEYWORD, KEYWORD2, LITERAL, MID_COMMENT, NUMBER, OPERATOR, PUNCTUATION, SEPARATOR, START_COMMENT, STRING, TAG, typeNames, UNRECOGNIZED, URL, WHITESPACE, WORD |
Constructor Summary | |
---|---|
JavaScanner()
Creates a Java scanner, for Java version 1.5 by default. |
|
JavaScanner(String version)
Creates a Java scanner, for a given version. |
Method Summary | |
---|---|
protected void |
initSymbolTable()
Overrides initSymbolTable to create Java-specific keywords and literals. |
protected Symbol |
lookup(int type,
String name)
Overrides lookup, but what about unicode escape translation? |
protected int |
read()
Overrides the read method from the Scanner class and processes Java syntax. |
Methods inherited from class jwo.utils.syntaxhighlighter.Scanner |
---|
change, find, getToken, position, remove, scan, size |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JavaScanner()
public JavaScanner(String version)
version
- Java version to scan. Should be between "1.1" and "1.5".Method Detail |
---|
protected int read()
read
in class Scanner
protected void initSymbolTable()
initSymbolTable
in class Scanner
protected Symbol lookup(int type, String name)
lookup
in class Scanner
type
- Type of symbol to look for.name
- Name of symbol to look for.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |