java.lang.Object
com.thoughtworks.qdox.parser.impl.DefaultJavaCommentLexer
- 所有已实现的接口:
Lexer
-
字段概要
字段修饰符和类型字段说明static final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intThis character denotes the end of file.static final int -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明intintgetLine()intlex()voidsetColumnOffset(int columnOffset) voidsetLineOffset(int lineOffset) text()final booleanyyatEOF()Returns whether the scanner has reached the end of the reader it reads from.final voidyybegin(int newState) Enters a new lexical state.final charyycharat(int position) Returns the character at the given position from the matched text.final voidyyclose()Closes the input reader.final intyylength()How many characters were matched.intyylex()Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs.voidyypushback(int number) Pushes the specified amount of characters back into the input stream.final voidResets the scanner to read from a new input stream.final intyystate()Returns the current lexical state.final Stringyytext()Returns the text matched by the current regular expression.
-
字段详细资料
-
YYEOF
public static final int YYEOFThis character denotes the end of file.- 另请参阅:
-
YYINITIAL
public static final int YYINITIAL- 另请参阅:
-
JAVADOC
public static final int JAVADOC- 另请参阅:
-
JAVADOCCONTENT
public static final int JAVADOCCONTENT- 另请参阅:
-
JAVADOCLINE
public static final int JAVADOCLINE- 另请参阅:
-
JAVADOCTAG
public static final int JAVADOCTAG- 另请参阅:
-
MULTILINECOMMENT
public static final int MULTILINECOMMENT- 另请参阅:
-
SINGLELINECOMMENT
public static final int SINGLELINECOMMENT- 另请参阅:
-
-
构造器详细资料
-
DefaultJavaCommentLexer
Creates a new scanner- 参数:
in- the java.io.Reader to read input from.
-
-
方法详细资料
-
lex
- 指定者:
lex在接口中Lexer- 抛出:
IOException
-
text
-
getLine
public int getLine() -
setLineOffset
public void setLineOffset(int lineOffset) -
getColumn
public int getColumn() -
setColumnOffset
public void setColumnOffset(int columnOffset) -
getCodeBody
- 指定者:
getCodeBody在接口中Lexer
-
yyclose
Closes the input reader.- 抛出:
IOException- if the reader could not be closed.
-
yyreset
Resets the scanner to read from a new input stream.Does not close the old reader.
All internal variables are reset, the old input stream cannot be reused (internal buffer is discarded and lost). Lexical state is set to
ZZ_INITIAL.Internal scan buffer is resized down to its initial length, if it has grown.
- 参数:
reader- The new input stream.
-
yyatEOF
public final boolean yyatEOF()Returns whether the scanner has reached the end of the reader it reads from.- 返回:
- whether the scanner has reached EOF.
-
yystate
public final int yystate()Returns the current lexical state.- 返回:
- the current lexical state.
-
yybegin
public final void yybegin(int newState) Enters a new lexical state.- 参数:
newState- the new lexical state
-
yytext
Returns the text matched by the current regular expression.- 返回:
- the matched text.
-
yycharat
public final char yycharat(int position) Returns the character at the given position from the matched text.It is equivalent to
yytext().charAt(pos), but faster.- 参数:
position- the position of the character to fetch. A value from 0 toyylength()-1.- 返回:
- the character at
position.
-
yylength
public final int yylength()How many characters were matched.- 返回:
- the length of the matched text region.
-
yypushback
public void yypushback(int number) Pushes the specified amount of characters back into the input stream.They will be read again by then next call of the scanning method.
- 参数:
number- the number of characters to be read again. This number must not be greater thanyylength().
-
yylex
Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs.- 返回:
- the next token.
- 抛出:
IOException- if any I/O-Error occurs.
-