public abstract class JFlexXref
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
Annotation |
annotation |
protected Definitions |
defs |
java.io.Writer |
out |
Project |
project |
java.lang.String |
urlPrefix |
protected java.lang.String |
userPageLink
|
protected java.lang.String |
userPageSuffix
|
Modifier | Constructor and Description |
---|---|
protected |
JFlexXref() |
Modifier and Type | Method and Description |
---|---|
protected void |
appendProject() |
protected abstract int |
getLineNumber()
Get the value of
yyline . |
protected java.lang.String |
getProjectPostfix() |
void |
reInit(char[] contents,
int length)
Reinitialize the xref with new contents.
|
void |
setDefs(Definitions defs) |
protected abstract void |
setLineNumber(int x)
Set the value of
yyline . |
protected void |
startNewLine()
Terminate the current line and insert preamble for the next line.
|
void |
write(java.io.Writer out)
Write xref to the specified
Writer . |
protected void |
writeEMailAddress(java.lang.String address)
Write an e-mail address.
|
protected void |
writeSymbol(java.lang.String symbol,
java.util.Set<java.lang.String> keywords,
int line)
Write a symbol and generate links as appropriate.
|
protected void |
writeUnicodeChar(char c)
Write HTML escape sequence for the specified Unicode character, unless
it's an ISO control character, in which case it is ignored.
|
abstract int |
yylex()
Get the next token from the scanner.
|
abstract void |
yyreset(java.io.Reader reader)
Reset the scanner.
|
public java.io.Writer out
public java.lang.String urlPrefix
public Annotation annotation
public Project project
protected Definitions defs
protected java.lang.String userPageLink
RuntimeEnvironment.getUserPage()
. Per default initialized
in the constructor and here to be consistent and avoid lot of
unnecessary lookups.startNewLine()
protected java.lang.String userPageSuffix
RuntimeEnvironment.getUserPageSuffix()
. Per default
initialized in the constructor and here to be consistent and avoid lot of
unnecessary lookups.startNewLine()
public void reInit(char[] contents, int length)
contents
- a char buffer with text to analyzelength
- the number of characters to use from the char bufferpublic void setDefs(Definitions defs)
protected void appendProject() throws java.io.IOException
java.io.IOException
protected java.lang.String getProjectPostfix()
public abstract int yylex() throws java.io.IOException
java.io.IOException
public abstract void yyreset(java.io.Reader reader)
protected abstract int getLineNumber()
yyline
.protected abstract void setLineNumber(int x)
yyline
.public void write(java.io.Writer out) throws java.io.IOException
Writer
.out
- xref destinationjava.io.IOException
- on error when writing the xrefprotected void startNewLine() throws java.io.IOException
java.io.IOException
- on error when writing the xrefprotected void writeSymbol(java.lang.String symbol, java.util.Set<java.lang.String> keywords, int line) throws java.io.IOException
symbol
- the symbol to writekeywords
- a set of keywords recognized by this analyzer (no links
will be generated if the symbol is a keyword)line
- the line number on which the symbol appearsjava.io.IOException
- if an error occurs while writing to the streamprotected void writeUnicodeChar(char c) throws java.io.IOException
c
- the character to writejava.io.IOException
- if an error occurs while writing to the streamprotected void writeEMailAddress(java.lang.String address) throws java.io.IOException
RuntimeEnvironment.isObfuscatingEMailAddresses()
returns
true
.address
- the address to writejava.io.IOException
- if an error occurs while writing to the stream