Package jtb
Class JavaParser
- Object
-
- JavaParser
-
- All Implemented Interfaces:
JavaParserConstants
public class JavaParser extends Object implements JavaParserConstants
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JavaParser.ModifierSet
-
Field Summary
Fields Modifier and Type Field Description Token
jj_nt
boolean
lookingAhead
Token
token
JavaParserTokenManager
token_source
-
Fields inherited from interface JavaParserConstants
_DEFAULT, ABSTRACT, ANDASSIGN, ASSERT, ASSIGN, AT, BANG, BIT_AND, BIT_OR, BOOLEAN, BREAK, BYTE, CASE, CATCH, CHAR, CHARACTER_LITERAL, CLASS, COLON, COMMA, CONST, CONTINUE, DECIMAL_EXPONENT, DECIMAL_FLOATING_POINT_LITERAL, DECIMAL_LITERAL, DECR, DEFAULT, DO, DOT, DOUBLE, ELLIPSIS, ELSE, ENUM, EOF, EQ, EXTENDS, FALSE, FINAL, FINALLY, FLOAT, FLOATING_POINT_LITERAL, FOR, FORMAL_COMMENT, GE, GOTO, GT, HEX_LITERAL, HEXADECIMAL_EXPONENT, HEXADECIMAL_FLOATING_POINT_LITERAL, HOOK, IDENTIFIER, IF, IMPLEMENTS, IMPORT, IN_FORMAL_COMMENT, IN_MULTI_LINE_COMMENT, INCR, INSTANCEOF, INT, INTEGER_LITERAL, INTERFACE, LBRACE, LBRACKET, LE, LETTER, LONG, LPAREN, LSHIFT, LSHIFTASSIGN, LT, MINUS, MINUSASSIGN, MULTI_LINE_COMMENT, NATIVE, NE, NEW, NULL, OCTAL_LITERAL, ORASSIGN, PACKAGE, PART_LETTER, PLUS, PLUSASSIGN, PRIVATE, PROTECTED, PUBLIC, RBRACE, RBRACKET, REM, REMASSIGN, RETURN, RPAREN, RSIGNEDSHIFT, RSIGNEDSHIFTASSIGN, RUNSIGNEDSHIFT, RUNSIGNEDSHIFTASSIGN, SC_AND, SC_OR, SEMICOLON, SHORT, SINGLE_LINE_COMMENT, SLASH, SLASHASSIGN, STAR, STARASSIGN, STATIC, STRICTFP, STRING_LITERAL, STUFF_TO_IGNORE, SUPER, SWITCH, SYNCHRONIZED, THIS, THROW, THROWS, TILDE, tokenImage, TRANSIENT, TRUE, TRY, VOID, VOLATILE, WHILE, XOR, XORASSIGN
-
-
Constructor Summary
Constructors Constructor Description JavaParser(InputStream stream)
JavaParser(Reader stream)
JavaParser(String fileName)
JavaParser(JavaParserTokenManager tm)
-
Method Summary
-
-
-
Field Detail
-
token_source
public JavaParserTokenManager token_source
-
lookingAhead
public boolean lookingAhead
-
-
Constructor Detail
-
JavaParser
public JavaParser(String fileName)
-
JavaParser
public JavaParser(InputStream stream)
-
JavaParser
public JavaParser(Reader stream)
-
JavaParser
public JavaParser(JavaParserTokenManager tm)
-
-
Method Detail
-
CompilationUnit
public final CompilationUnit CompilationUnit() throws ParseException
- Throws:
ParseException
-
PackageDeclaration
public final PackageDeclaration PackageDeclaration() throws ParseException
- Throws:
ParseException
-
ImportDeclaration
public final ImportDeclaration ImportDeclaration() throws ParseException
- Throws:
ParseException
-
Modifiers
public final Modifiers Modifiers() throws ParseException
- Throws:
ParseException
-
TypeDeclaration
public final TypeDeclaration TypeDeclaration() throws ParseException
- Throws:
ParseException
-
ClassOrInterfaceDeclaration
public final ClassOrInterfaceDeclaration ClassOrInterfaceDeclaration(int modifiers) throws ParseException
- Throws:
ParseException
-
ExtendsList
public final ExtendsList ExtendsList(boolean isInterface) throws ParseException
- Throws:
ParseException
-
ImplementsList
public final ImplementsList ImplementsList(boolean isInterface) throws ParseException
- Throws:
ParseException
-
EnumDeclaration
public final EnumDeclaration EnumDeclaration(int modifiers) throws ParseException
- Throws:
ParseException
-
EnumBody
public final EnumBody EnumBody() throws ParseException
- Throws:
ParseException
-
EnumConstant
public final EnumConstant EnumConstant() throws ParseException
- Throws:
ParseException
-
TypeParameters
public final TypeParameters TypeParameters() throws ParseException
- Throws:
ParseException
-
TypeParameter
public final TypeParameter TypeParameter() throws ParseException
- Throws:
ParseException
-
TypeBound
public final TypeBound TypeBound() throws ParseException
- Throws:
ParseException
-
ClassOrInterfaceBody
public final ClassOrInterfaceBody ClassOrInterfaceBody(boolean isInterface) throws ParseException
- Throws:
ParseException
-
ClassOrInterfaceBodyDeclaration
public final ClassOrInterfaceBodyDeclaration ClassOrInterfaceBodyDeclaration(boolean isInterface) throws ParseException
- Throws:
ParseException
-
FieldDeclaration
public final FieldDeclaration FieldDeclaration(int modifiers) throws ParseException
- Throws:
ParseException
-
VariableDeclarator
public final VariableDeclarator VariableDeclarator() throws ParseException
- Throws:
ParseException
-
VariableDeclaratorId
public final VariableDeclaratorId VariableDeclaratorId() throws ParseException
- Throws:
ParseException
-
VariableInitializer
public final VariableInitializer VariableInitializer() throws ParseException
- Throws:
ParseException
-
ArrayInitializer
public final ArrayInitializer ArrayInitializer() throws ParseException
- Throws:
ParseException
-
MethodDeclaration
public final MethodDeclaration MethodDeclaration(int modifiers) throws ParseException
- Throws:
ParseException
-
MethodDeclarator
public final MethodDeclarator MethodDeclarator() throws ParseException
- Throws:
ParseException
-
FormalParameters
public final FormalParameters FormalParameters() throws ParseException
- Throws:
ParseException
-
FormalParameter
public final FormalParameter FormalParameter() throws ParseException
- Throws:
ParseException
-
ConstructorDeclaration
public final ConstructorDeclaration ConstructorDeclaration() throws ParseException
- Throws:
ParseException
-
ExplicitConstructorInvocation
public final ExplicitConstructorInvocation ExplicitConstructorInvocation() throws ParseException
- Throws:
ParseException
-
Initializer
public final Initializer Initializer() throws ParseException
- Throws:
ParseException
-
Type
public final Type Type() throws ParseException
- Throws:
ParseException
-
ReferenceType
public final ReferenceType ReferenceType() throws ParseException
- Throws:
ParseException
-
ClassOrInterfaceType
public final ClassOrInterfaceType ClassOrInterfaceType() throws ParseException
- Throws:
ParseException
-
TypeArguments
public final TypeArguments TypeArguments() throws ParseException
- Throws:
ParseException
-
TypeArgument
public final TypeArgument TypeArgument() throws ParseException
- Throws:
ParseException
-
WildcardBounds
public final WildcardBounds WildcardBounds() throws ParseException
- Throws:
ParseException
-
PrimitiveType
public final PrimitiveType PrimitiveType() throws ParseException
- Throws:
ParseException
-
ResultType
public final ResultType ResultType() throws ParseException
- Throws:
ParseException
-
Name
public final Name Name() throws ParseException
- Throws:
ParseException
-
NameList
public final NameList NameList() throws ParseException
- Throws:
ParseException
-
Expression
public final Expression Expression() throws ParseException
- Throws:
ParseException
-
AssignmentOperator
public final AssignmentOperator AssignmentOperator() throws ParseException
- Throws:
ParseException
-
ConditionalExpression
public final ConditionalExpression ConditionalExpression() throws ParseException
- Throws:
ParseException
-
ConditionalOrExpression
public final ConditionalOrExpression ConditionalOrExpression() throws ParseException
- Throws:
ParseException
-
ConditionalAndExpression
public final ConditionalAndExpression ConditionalAndExpression() throws ParseException
- Throws:
ParseException
-
InclusiveOrExpression
public final InclusiveOrExpression InclusiveOrExpression() throws ParseException
- Throws:
ParseException
-
ExclusiveOrExpression
public final ExclusiveOrExpression ExclusiveOrExpression() throws ParseException
- Throws:
ParseException
-
AndExpression
public final AndExpression AndExpression() throws ParseException
- Throws:
ParseException
-
EqualityExpression
public final EqualityExpression EqualityExpression() throws ParseException
- Throws:
ParseException
-
InstanceOfExpression
public final InstanceOfExpression InstanceOfExpression() throws ParseException
- Throws:
ParseException
-
RelationalExpression
public final RelationalExpression RelationalExpression() throws ParseException
- Throws:
ParseException
-
ShiftExpression
public final ShiftExpression ShiftExpression() throws ParseException
- Throws:
ParseException
-
AdditiveExpression
public final AdditiveExpression AdditiveExpression() throws ParseException
- Throws:
ParseException
-
MultiplicativeExpression
public final MultiplicativeExpression MultiplicativeExpression() throws ParseException
- Throws:
ParseException
-
UnaryExpression
public final UnaryExpression UnaryExpression() throws ParseException
- Throws:
ParseException
-
PreIncrementExpression
public final PreIncrementExpression PreIncrementExpression() throws ParseException
- Throws:
ParseException
-
PreDecrementExpression
public final PreDecrementExpression PreDecrementExpression() throws ParseException
- Throws:
ParseException
-
UnaryExpressionNotPlusMinus
public final UnaryExpressionNotPlusMinus UnaryExpressionNotPlusMinus() throws ParseException
- Throws:
ParseException
-
CastLookahead
public final CastLookahead CastLookahead() throws ParseException
- Throws:
ParseException
-
PostfixExpression
public final PostfixExpression PostfixExpression() throws ParseException
- Throws:
ParseException
-
CastExpression
public final CastExpression CastExpression() throws ParseException
- Throws:
ParseException
-
PrimaryExpression
public final PrimaryExpression PrimaryExpression() throws ParseException
- Throws:
ParseException
-
MemberSelector
public final MemberSelector MemberSelector() throws ParseException
- Throws:
ParseException
-
PrimaryPrefix
public final PrimaryPrefix PrimaryPrefix() throws ParseException
- Throws:
ParseException
-
PrimarySuffix
public final PrimarySuffix PrimarySuffix() throws ParseException
- Throws:
ParseException
-
Literal
public final Literal Literal() throws ParseException
- Throws:
ParseException
-
BooleanLiteral
public final BooleanLiteral BooleanLiteral() throws ParseException
- Throws:
ParseException
-
NullLiteral
public final NullLiteral NullLiteral() throws ParseException
- Throws:
ParseException
-
Arguments
public final Arguments Arguments() throws ParseException
- Throws:
ParseException
-
ArgumentList
public final ArgumentList ArgumentList() throws ParseException
- Throws:
ParseException
-
AllocationExpression
public final AllocationExpression AllocationExpression() throws ParseException
- Throws:
ParseException
-
ArrayDimsAndInits
public final ArrayDimsAndInits ArrayDimsAndInits() throws ParseException
- Throws:
ParseException
-
Statement
public final Statement Statement() throws ParseException
- Throws:
ParseException
-
AssertStatement
public final AssertStatement AssertStatement() throws ParseException
- Throws:
ParseException
-
LabeledStatement
public final LabeledStatement LabeledStatement() throws ParseException
- Throws:
ParseException
-
Block
public final Block Block() throws ParseException
- Throws:
ParseException
-
BlockStatement
public final BlockStatement BlockStatement() throws ParseException
- Throws:
ParseException
-
LocalVariableDeclaration
public final LocalVariableDeclaration LocalVariableDeclaration() throws ParseException
- Throws:
ParseException
-
EmptyStatement
public final EmptyStatement EmptyStatement() throws ParseException
- Throws:
ParseException
-
StatementExpression
public final StatementExpression StatementExpression() throws ParseException
- Throws:
ParseException
-
SwitchStatement
public final SwitchStatement SwitchStatement() throws ParseException
- Throws:
ParseException
-
SwitchLabel
public final SwitchLabel SwitchLabel() throws ParseException
- Throws:
ParseException
-
IfStatement
public final IfStatement IfStatement() throws ParseException
- Throws:
ParseException
-
WhileStatement
public final WhileStatement WhileStatement() throws ParseException
- Throws:
ParseException
-
DoStatement
public final DoStatement DoStatement() throws ParseException
- Throws:
ParseException
-
ForStatement
public final ForStatement ForStatement() throws ParseException
- Throws:
ParseException
-
ForInit
public final ForInit ForInit() throws ParseException
- Throws:
ParseException
-
StatementExpressionList
public final StatementExpressionList StatementExpressionList() throws ParseException
- Throws:
ParseException
-
ForUpdate
public final ForUpdate ForUpdate() throws ParseException
- Throws:
ParseException
-
BreakStatement
public final BreakStatement BreakStatement() throws ParseException
- Throws:
ParseException
-
ContinueStatement
public final ContinueStatement ContinueStatement() throws ParseException
- Throws:
ParseException
-
ReturnStatement
public final ReturnStatement ReturnStatement() throws ParseException
- Throws:
ParseException
-
ThrowStatement
public final ThrowStatement ThrowStatement() throws ParseException
- Throws:
ParseException
-
SynchronizedStatement
public final SynchronizedStatement SynchronizedStatement() throws ParseException
- Throws:
ParseException
-
TryStatement
public final TryStatement TryStatement() throws ParseException
- Throws:
ParseException
-
RUNSIGNEDSHIFT
public final RUNSIGNEDSHIFT RUNSIGNEDSHIFT() throws ParseException
- Throws:
ParseException
-
RSIGNEDSHIFT
public final RSIGNEDSHIFT RSIGNEDSHIFT() throws ParseException
- Throws:
ParseException
-
Annotation
public final Annotation Annotation() throws ParseException
- Throws:
ParseException
-
NormalAnnotation
public final NormalAnnotation NormalAnnotation() throws ParseException
- Throws:
ParseException
-
MarkerAnnotation
public final MarkerAnnotation MarkerAnnotation() throws ParseException
- Throws:
ParseException
-
SingleMemberAnnotation
public final SingleMemberAnnotation SingleMemberAnnotation() throws ParseException
- Throws:
ParseException
-
MemberValuePairs
public final MemberValuePairs MemberValuePairs() throws ParseException
- Throws:
ParseException
-
MemberValuePair
public final MemberValuePair MemberValuePair() throws ParseException
- Throws:
ParseException
-
MemberValue
public final MemberValue MemberValue() throws ParseException
- Throws:
ParseException
-
MemberValueArrayInitializer
public final MemberValueArrayInitializer MemberValueArrayInitializer() throws ParseException
- Throws:
ParseException
-
AnnotationTypeDeclaration
public final AnnotationTypeDeclaration AnnotationTypeDeclaration(int modifiers) throws ParseException
- Throws:
ParseException
-
AnnotationTypeBody
public final AnnotationTypeBody AnnotationTypeBody() throws ParseException
- Throws:
ParseException
-
AnnotationTypeMemberDeclaration
public final AnnotationTypeMemberDeclaration AnnotationTypeMemberDeclaration() throws ParseException
- Throws:
ParseException
-
DefaultValue
public final DefaultValue DefaultValue() throws ParseException
- Throws:
ParseException
-
ReInit
public void ReInit(InputStream stream)
-
ReInit
public void ReInit(JavaParserTokenManager tm)
-
getNextToken
public final Token getNextToken()
-
generateParseException
public ParseException generateParseException()
-
enable_tracing
public final void enable_tracing()
-
disable_tracing
public final void disable_tracing()
-
-