|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jtool.jxplatform.j2x.parser.JavaParser
Parses input source code and generates a DOM tree from it.
| Field Summary | |
static Token |
jj_nt
|
static boolean |
lookingAhead
|
static Token |
token
|
static JavaParserTokenManager |
token_source
|
| Constructor Summary | |
JavaParser(java.io.InputStream stream)
|
|
JavaParser(JavaParserTokenManager tm)
|
|
JavaParser(java.io.Reader stream)
|
|
| Method Summary | |
static void |
AdditiveExpression(org.w3c.dom.Element parent)
AdditiveExpression: MultiplicativeExpression ( ( "+" | "-" ) MultiplicativeExpression )* |
static org.w3c.dom.Element |
AllocationExpression()
AllocationExpression: "new" PrimitiveType ArrayDimsAndInits | "new" ClassOrInterfaceType [ TypeArguments ] ( ArrayDimsAndInits | Arguments [ ClassOrInterfaceBody ] ) |
static void |
AndExpression(org.w3c.dom.Element parent)
AndExpression: EqualityExpression ( "&" EqualityExpression )* |
static void |
Annotation(org.w3c.dom.Element parent)
Java5.0 annotation Annotation: NormalAnnotation | SingleMemberAnnotation | MarkerAnnotation |
static void |
AnnotationTypeBody(org.w3c.dom.Element parent)
Java5.0 annotation AnnotationTypeBody: "{" ( AnnotationTypeMemberDeclaration )* "}" |
static void |
AnnotationTypeDeclaration(int modifiers,
org.w3c.dom.Element melem,
org.w3c.dom.Element parent)
Java5.0 annotation AnnotationTypeDeclaration: "@" "interface" |
static void |
AnnotationTypeMemberDeclaration(org.w3c.dom.Element parent)
Java5.0 annotation AnnotationTypeMemberDeclaration: Modifiers ( Type |
static void |
ArgumentList(org.w3c.dom.Element parent)
ArgumentList: Expression ( "," Expression )* |
static void |
Arguments(org.w3c.dom.Element parent)
Arguments: "(" [ ArgumentList ] ")" |
static void |
ArrayDimsAndInits(org.w3c.dom.Element parent)
ArrayDimsAndInits: ( "[" Expression "]" )+ ( "[" "]" )* | ( "[" "]" )+ ArrayInitializer |
static void |
ArrayInitializer(org.w3c.dom.Element parent)
ArrayInitializer: "{" [ VariableInitializer ( "," VariableInitializer )* ] [ "," ] "}" |
static void |
AssertStatement(org.w3c.dom.Element parent)
AssertStatement: "assert" Expression [ ":" Expression ] ";" |
static java.lang.String |
AssignmentOperator(org.w3c.dom.Element parent)
AssignmentOperator: "=" | "*=" | "/=" | "%=" | "+=" | "-=" | "<<=" | ">>=" | ">>>=" | "&=" | "^=" | "|=" |
static void |
Block(org.w3c.dom.Element parent)
Block: "{" ( BlockStatement )* "}" |
static void |
BlockStatement(org.w3c.dom.Element parent)
BlockStatement: LocalVariableDeclaration ";" | Statement | ClassDeclaration | InterfaceDeclaration |
static void |
BooleanLiteral(org.w3c.dom.Element parent)
BooleanLiteral: ( "true" | "false" ) |
static void |
BreakStatement(org.w3c.dom.Element parent)
BreakStatement: "break" [ |
static void |
CastExpression(org.w3c.dom.Element parent)
CastExpression: "(" Type ")" UnaryExpression | "(" Type ")" UnaryExpressionNotPlusMinus |
static void |
CastLookahead()
|
static void |
ClassDeclaration(int modifiers,
org.w3c.dom.Element melem,
org.w3c.dom.Element parent)
ClassDeclaration: "class" |
static void |
ClassOrInterfaceBody(org.w3c.dom.Element parent)
ClassOrInterfaceBody: "{" ( ClassOrInterfaceBodyDeclaration )* "}" |
static void |
ClassOrInterfaceBodyDeclaration(org.w3c.dom.Element parent)
ClassOrInterfaceBodyDeclaration: Initializer | modifiers = Modifiers ( ClassDeclaration | IterfaceDeclaration | EnumDeclaration | ConstructorDeclaration | FieldDeclaration | MethodDeclaration ) | ";" |
static java.lang.String |
ClassOrInterfaceType(org.w3c.dom.Element parent)
ClassOrInterfaceType: |
static void |
close()
Closes the parser. |
static void |
CompilationUnit()
CompilationUnit: [ PackageDeclaration ] ( ImportDeclaration )* ( TypeDeclaration )* |
static void |
ConditionalAndExpression(org.w3c.dom.Element parent)
ConditionalAndExpression: InclusiveOrExpression ( "&&" InclusiveOrExpression )* |
static void |
ConditionalExpression(org.w3c.dom.Element parent)
ConditionalExpression: ConditionalOrExpression [ "?" |
static void |
ConditionalOrExpression(org.w3c.dom.Element parent)
ConditionalOrExpression: ConditionalAndExpression ( "||" ConditionalAndExpression )* |
static void |
ConstructorDeclaration(int modifiers,
org.w3c.dom.Element melem,
org.w3c.dom.Element parent)
ConstructorDeclaration: [ TypeParameters() ] |
static void |
ContinueStatement(org.w3c.dom.Element parent)
ContinueStatement: "continue" [ |
static void |
DefaultValue(org.w3c.dom.Element parent)
Java5.0 annotation DefaultValue: "default" MemberValue |
static void |
disable_tracing()
|
static void |
DoStatement(org.w3c.dom.Element parent)
DoStatement: "do" Statement "while" "(" Expression ")" ";" |
static void |
EmptyStatement(org.w3c.dom.Element parent)
EmptyStatement: ";" |
static void |
enable_tracing()
|
static void |
EnumBody(org.w3c.dom.Element parent)
Java5.0 enum EnumBody: "{" EnumConstant ( "," EnumConstant )* [ ";" ( ClassOrInterfaceBodyDeclaration )* ] "}" |
static void |
EnumConstant(org.w3c.dom.Element parent)
Java5.0 enum EnumConstant: |
static void |
EnumDeclaration(int modifiers,
org.w3c.dom.Element melem,
org.w3c.dom.Element parent)
Java5.0 enum EnumDeclaration: "enum" |
static void |
EqualityExpression(org.w3c.dom.Element parent)
EqualityExpression: InstanceOfExpression ( ( "==" | "! |
static void |
ExclusiveOrExpression(org.w3c.dom.Element parent)
ExclusiveOrExpression: AndExpression ( "^" AndExpression )* |
static void |
ExplicitConstructorInvocation(org.w3c.dom.Element parent)
ExplicitConstructorInvocation: "this" Arguments ";" | [ PrimaryExpression "." ] "super" Arguments ";" |
static void |
Expression(org.w3c.dom.Element parent)
Expression: ConditionalExpression [ AssignmentOperator Expression ] |
static void |
Extends(org.w3c.dom.Element parent)
Extends: "extends" ClassOrInterfaceType |
static void |
ExtendsList(org.w3c.dom.Element parent)
ExtendsList: "extends" ClassOrInterfaceType ( "," ClassOrInterfaceType )* |
static void |
FieldDeclaration(int modifiers,
org.w3c.dom.Element melem,
org.w3c.dom.Element parent)
FieldDeclaration: Type VariableDeclarator ( "," VariableDeclarator )* ";" |
static void |
ForInit(org.w3c.dom.Element parent)
ForInit: LocalVariableDeclaration | StatementExpressionList |
static void |
FormalParameter(org.w3c.dom.Element parent)
FormalParameter: [ "final" ] Type [ "..." ] VariableDeclaratorId |
static void |
FormalParameters(org.w3c.dom.Element parent)
FormalParameters: "(" [ FormalParameter ( "," FormalParameter )* ] ")" |
static void |
ForStatement(org.w3c.dom.Element parent)
ForStatement: "for" "(" ( Type |
static void |
ForUpdate(org.w3c.dom.Element parent)
ForUpdate: StatementExpressionList |
static ParseException |
generateParseException()
|
static Token |
getNextToken()
|
static Token |
getToken(int index)
|
static void |
IfStatement(org.w3c.dom.Element parent)
IfStatement: "if" "(" Expression ")" Statement [ "else" Statement ] |
static void |
ImplementsList(org.w3c.dom.Element parent)
ImplementsList: "implements" ClassOrInterfaceType ( "," ClassOrInterfaceType )* |
static void |
ImportDeclaration(org.w3c.dom.Element parent)
ImportDeclaration: "import" [ "static" ] Name [ "." "*" ] ";" |
static void |
InclusiveOrExpression(org.w3c.dom.Element parent)
InclusiveOrExpression: ExclusiveOrExpression ( "|" ExclusiveOrExpression )* |
static void |
Initializer(org.w3c.dom.Element melem,
org.w3c.dom.Element parent)
Initializer: [ "static" ] Block |
static void |
InstanceOfExpression(org.w3c.dom.Element parent)
InstanceOfExpression: RelationalExpression [ "instanceof" Type ] |
static void |
InterfaceDeclaration(int modifiers,
org.w3c.dom.Element melem,
org.w3c.dom.Element parent)
InterfaceDeclaration: "interface" |
static void |
LabeledStatement(org.w3c.dom.Element parent)
LabeledStatement: |
static org.w3c.dom.Element |
Literal()
Literal: |
static void |
LocalVariableDeclaration(org.w3c.dom.Element parent)
LocalVariableDeclaration: [ "final" ] Type VariableDeclarator ( "," VariableDeclarator )* |
static void |
MarkerAnnotation(org.w3c.dom.Element parent)
Java5.0 annotation MarkerAnnotation: "@" Name |
static org.w3c.dom.Element |
MemberSelector(org.w3c.dom.Element parent)
Java 1.5 type parameter MemberSelector: "." |
static void |
MemberValue(org.w3c.dom.Element parent)
Java5.0 annotation MemberValue: Annotation | MemberValueArrayInitializer | ConditionalExpression |
static void |
MemberValueArrayInitializer(org.w3c.dom.Element parent)
Java5.0 annotation MemberValueArrayInitializer: "{" MemberValue ( "," MemberValue )* [ "," ] "}" |
static void |
MemberValuePair(org.w3c.dom.Element parent)
Java5.0 annotation MemberValuePair: |
static void |
MemberValuePairs(org.w3c.dom.Element parent)
Java5.0 annotation MemberValuePairs: MemberValuePair ( "," MemberValuePair )* |
static void |
MethodDeclaration(int modifiers,
org.w3c.dom.Element melem,
org.w3c.dom.Element parent)
MethodDeclaration: [ TypeParameters ] ResultType MethodDeclarator [ ThrowsList ] ( Block | ";" ) |
static java.lang.String |
MethodDeclarator(org.w3c.dom.Element parent,
java.lang.String typeid)
MethodDeclarator |
static int |
Modifiers(org.w3c.dom.Element elem,
org.w3c.dom.Element parent)
( "public" | "static" | "protected" | "private" | "final" | "abstract" | "synchronized" | "native" | "transient" | "volatile" | "strictfp" | Annotation )* |
static void |
MultiplicativeExpression(org.w3c.dom.Element parent)
MultiplicativeExpression: UnaryExpression ( ( "*" | "/" | "%" ) UnaryExpression )* |
static org.w3c.dom.Element |
Name()
Name: |
static void |
NormalAnnotation(org.w3c.dom.Element parent)
Java5.0 annotation NormalAnnotation: "@" Name "(" [ MemberValuePairs ] ")" |
static void |
NullLiteral(org.w3c.dom.Element parent)
BooleanLiteral: "null" |
static void |
PackageDeclaration(org.w3c.dom.Element parent)
PackageDeclaration: "package" Name ";" |
static void |
parse(java.io.Reader reader)
Parses input source code by using JavaCC's JavaParser. |
static void |
PostfixExpression(org.w3c.dom.Element parent)
PostfixExpression: PrimaryExpression [ "++" | "--" ] |
static void |
PreDecrementExpression(org.w3c.dom.Element parent)
PreDecrementExpression: "--" PrimaryExpression |
static void |
PreIncrementExpression(org.w3c.dom.Element parent)
PreIncrementExpression: "++" PrimaryExpression |
static void |
PrimaryExpression(org.w3c.dom.Element parent)
PrimaryExpression: PrimaryPrefix ( PrimarySuffix )* |
static org.w3c.dom.Element |
PrimaryPrefix(org.w3c.dom.Element parent)
PrimaryPrefix: Literal | "this" | "super" "." |
static org.w3c.dom.Element |
PrimarySuffix(org.w3c.dom.Element parent)
PrimarySuffix: "." |
static java.lang.String |
PrimitiveType(org.w3c.dom.Element parent)
PrimitiveType: "boolean" | "char" | "byte" | "short" | "int" | "long" | "float" | "double" |
static java.lang.String |
QualifiedName(org.w3c.dom.Element parent)
QualifiedName: |
static java.lang.String |
ReferenceType(org.w3c.dom.Element parent)
ReferenceType: PrimitiveType ( "[" "]" )+ | ClassOrInterfaceType ( "[" "]" )* |
static void |
ReInit(java.io.InputStream stream)
|
void |
ReInit(JavaParserTokenManager tm)
|
static void |
ReInit(java.io.Reader stream)
|
static void |
RelationalExpression(org.w3c.dom.Element parent)
RelationalExpression: ShiftExpression ( ( "<" | ">" | "<=" | ">=" ) ShiftExpression )* |
static java.lang.String |
ResultType(org.w3c.dom.Element parent)
ResultType: "void" | Type |
static void |
ReturnStatement(org.w3c.dom.Element parent)
ReturnStatement: "return" [ Expression(null) ] ";" |
static Token |
RSIGNEDSHIFT()
">>" |
static Token |
RUNSIGNEDSHIFT()
">>>" |
static void |
setSource(java.lang.String fname,
org.w3c.dom.Document d)
Sets the name of source code to be parsed and its DOM document. |
static void |
ShiftExpression(org.w3c.dom.Element parent)
ShiftExpression: AdditiveExpression ( ( "<<" | RSIGNEDSHIFT | RUNSIGNEDSHIFT ) AdditiveExpression )* |
static void |
SingleMemberAnnotation(org.w3c.dom.Element parent)
Java5.0 annotation SingleMemberAnnotation: "@" Name "(" MemberValue ")" |
static void |
Statement(org.w3c.dom.Element parent)
Statement: LabeledStatement | AssertStatement | Block | EmptyStatement | StatementExpression0 ";" | SwitchStatement | IfStatement | WhileStatement | DoStatement | ForStatement | BreakStatement | ContinueStatement | ReturnStatement | ThrowStatement | SynchronizedStatement | TryStatement |
static void |
StatementExpression(org.w3c.dom.Element parent)
StatementExpression: PreIncrementExpression | PreDecrementExpression | PrimaryExpression [ "++" | "--" | AssignmentOperator Expression ] |
static org.w3c.dom.Element |
StatementExpression0(org.w3c.dom.Element parent)
StatementExpression0: StatementExpression |
static void |
StatementExpressionList(org.w3c.dom.Element parent)
StatementExpressionList: StatementExpression ( "," StatementExpression )* |
static void |
SwitchLabel(org.w3c.dom.Element parent)
SwitchLabel: "case" Expression ":" | "default" ":" |
static void |
SwitchStatement(org.w3c.dom.Element parent)
SwitchStatement: "switch" "(" Expression ")" "{" ( SwitchLabel ( BlockStatement )* )* "}" |
static void |
SynchronizedStatement(org.w3c.dom.Element parent)
SynchronizedStatement: "synchronized" "(" Expression ")" Block |
static void |
ThrowsList(org.w3c.dom.Element parent)
ThrowsList: "throws" ClassOrInterfaceType ( "," ClassOrInterfaceType )* |
static void |
ThrowStatement(org.w3c.dom.Element parent)
ThrowStatement: "throw" Expression ";" |
static void |
TryStatement(org.w3c.dom.Element parent)
TryStatement: "try" Block ( "catch" "(" FormalParameter ")" Block )* [ "finally" Block ] |
static java.lang.String |
Type(org.w3c.dom.Element parent)
Type: ReferenceType | PrimitiveType |
static void |
TypeArgument(org.w3c.dom.Element parent)
Java5.0 type parameter TypeArgument: ReferenceType | "?" |
static void |
TypeArguments(org.w3c.dom.Element parent)
Java5.0 type parameter TypeArguments: "<" TypeArgument ( "," TypeArgument )* ">" |
static void |
TypeBound(org.w3c.dom.Element parent)
Java5.0 type parameter TypeBound: "extends" ClassOrInterfaceType ( "&" ClassOrInterfaceType )* |
static void |
TypeDeclaration(org.w3c.dom.Element parent)
TypeDeclaration: ";" | Modifiers ( ClassDeclaration | InterfaceDeclaration | EnumDeclaration | AnnotationTypeDeclaration ) |
static void |
TypeParameter(org.w3c.dom.Element parent)
Java5.0 type parameter TypeParameter: |
static void |
TypeParameters(org.w3c.dom.Element parent)
Java5.0 type parameter TypeParameters: "<" TypeParameter ( "," TypeParameter )* ">" |
static void |
UnaryExpression(org.w3c.dom.Element parent)
UnaryExpression: ( "+" | "-" ) UnaryExpression | PreIncrementExpression | PreDecrementExpression | UnaryExpressionNotPlusMinus |
static void |
UnaryExpressionNotPlusMinus(org.w3c.dom.Element parent)
UnaryExpressionNotPlusMinus: ( "~" | "!" |
static java.lang.String |
VariableDeclarator(org.w3c.dom.Element parent,
java.lang.String typeid)
VariableDeclarator: VariableDeclaratorId [ "=" VariableInitializer ] |
static java.lang.String |
VariableDeclaratorId(java.lang.String typeid,
org.w3c.dom.Element parent,
org.w3c.dom.Element grandparent)
VariableDeclaratorId: |
static void |
VariableInitializer(org.w3c.dom.Element parent)
VariableInitializer: ArrayInitializer | Expression |
static void |
WhileStatement(org.w3c.dom.Element parent)
WhileStatement: "while" "(" Expression ")" Statement |
static java.lang.String |
WildcardBounds(org.w3c.dom.Element parent)
Java5.0 type parameter WildcardBounds: "extends" ReferenceType | "super" ReferenceType |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static JavaParserTokenManager token_source
public static Token token
public static Token jj_nt
public static boolean lookingAhead
| Constructor Detail |
public JavaParser(java.io.InputStream stream)
public JavaParser(java.io.Reader stream)
public JavaParser(JavaParserTokenManager tm)
| Method Detail |
public static void setSource(java.lang.String fname,
org.w3c.dom.Document d)
fname - The name of source code.d - A DOM object.
public static void parse(java.io.Reader reader)
throws ParseException
JavaParser.
reader - A character-stream reader of source code to be parsed.
ParseException - if parse errors are encountered.public static void close()
public static final void CompilationUnit()
throws ParseException
CompilationUnit: [ PackageDeclaration ] ( ImportDeclaration )* ( TypeDeclaration )*
ParseException
public static final void PackageDeclaration(org.w3c.dom.Element parent)
throws ParseException
PackageDeclaration: "package" Name ";"
parent - The parent of the examined node.
ParseException
public static final void ImportDeclaration(org.w3c.dom.Element parent)
throws ParseException
ImportDeclaration: "import" [ "static" ] Name [ "." "*" ] ";"
parent - The parent of the examined node.
ParseException
public static final int Modifiers(org.w3c.dom.Element elem,
org.w3c.dom.Element parent)
throws ParseException
( "public" | "static" | "protected" | "private" | "final" | "abstract" | "synchronized" | "native" | "transient" | "volatile" | "strictfp" | Annotation )*
elem - The examined node.parent - The parent of the examined node.
ParseException
public static final void TypeDeclaration(org.w3c.dom.Element parent)
throws ParseException
TypeDeclaration:
";"
| Modifiers
( ClassDeclaration
| InterfaceDeclaration
| EnumDeclaration
| AnnotationTypeDeclaration
)
parent - The parent of the examined node.
ParseException
public static final void ClassDeclaration(int modifiers,
org.w3c.dom.Element melem,
org.w3c.dom.Element parent)
throws ParseException
ClassDeclaration: "class"[ TypeParameters ] [ Extends ] [ ImplementsList ] ClassOrInterfaceBody
modifiers - A modifier string.melem - The node corresponding to a modifier.parent - The parent of the examined node.
ParseException
public static final void InterfaceDeclaration(int modifiers,
org.w3c.dom.Element melem,
org.w3c.dom.Element parent)
throws ParseException
InterfaceDeclaration: "interface"[ TypeParameters ] [ ExtendsList ] ClassOrInterfaceBody
modifiers - A modifier string.melem - The node corresponding to a modifier.parent - The parent of the examined node.
ParseException
public static final void Extends(org.w3c.dom.Element parent)
throws ParseException
Extends: "extends" ClassOrInterfaceType
parent - The parent of the examined node.
ParseException
public static final void ExtendsList(org.w3c.dom.Element parent)
throws ParseException
ExtendsList: "extends" ClassOrInterfaceType ( "," ClassOrInterfaceType )*
parent - The parent of the examined node.
ParseException
public static final void ImplementsList(org.w3c.dom.Element parent)
throws ParseException
ImplementsList: "implements" ClassOrInterfaceType ( "," ClassOrInterfaceType )*
parent - The parent of the examined node.
ParseException
public static final void EnumDeclaration(int modifiers,
org.w3c.dom.Element melem,
org.w3c.dom.Element parent)
throws ParseException
EnumDeclaration:
"enum" [ ImplementsList ]
EnumBody
modifiers - A modifier string.melem - The node corresponding to a modifier.parent - The parent of the examined node.
ParseException
public static final void EnumBody(org.w3c.dom.Element parent)
throws ParseException
EnumBody:
"{"
EnumConstant ( "," EnumConstant )*
[ ";" ( ClassOrInterfaceBodyDeclaration )* ]
"}"
parent - The parent of the examined node.
ParseException
public static final void EnumConstant(org.w3c.dom.Element parent)
throws ParseException
EnumConstant:
[ Arguments ] [ ClassOrInterfaceBody ]
parent - The parent of the examined node.
ParseException
public static final void TypeParameters(org.w3c.dom.Element parent)
throws ParseException
TypeParameters:
"<" TypeParameter ( "," TypeParameter )* ">"
parent - The parent of the examined node.
ParseException
public static final void TypeParameter(org.w3c.dom.Element parent)
throws ParseException
TypeParameter:
[ TypeBound ]
parent - The parent of the examined node.
ParseException
public static final void TypeBound(org.w3c.dom.Element parent)
throws ParseException
TypeBound:
"extends" ClassOrInterfaceType ( "&" ClassOrInterfaceType )*
parent - The parent of the examined node.
ParseException
public static final void ClassOrInterfaceBody(org.w3c.dom.Element parent)
throws ParseException
ClassOrInterfaceBody:
"{" ( ClassOrInterfaceBodyDeclaration )* "}"
parent - The parent of the examined node.
ParseException
public static final void ClassOrInterfaceBodyDeclaration(org.w3c.dom.Element parent)
throws ParseException
ClassOrInterfaceBodyDeclaration:
Initializer
| modifiers = Modifiers
( ClassDeclaration
| IterfaceDeclaration
| EnumDeclaration
| ConstructorDeclaration
| FieldDeclaration
| MethodDeclaration
)
| ";"
parent - The parent of the examined node.
ParseException
public static final void FieldDeclaration(int modifiers,
org.w3c.dom.Element melem,
org.w3c.dom.Element parent)
throws ParseException
FieldDeclaration: Type VariableDeclarator ( "," VariableDeclarator )* ";"
modifiers - A modifier string.melem - The node corresponding to a modifier.parent - The parent of the examined node.
ParseException
public static final java.lang.String VariableDeclarator(org.w3c.dom.Element parent,
java.lang.String typeid)
throws ParseException
VariableDeclarator: VariableDeclaratorId [ "=" VariableInitializer ]
parent - The parent of the examined node.typeid - The id string of the type.
ParseException
public static final java.lang.String VariableDeclaratorId(java.lang.String typeid,
org.w3c.dom.Element parent,
org.w3c.dom.Element grandparent)
throws ParseException
VariableDeclaratorId:( "[" "]" )*
typeid - The id string of the type.parent - The parent of the examined node.grandparent - The grand-parent of the examined node.
ParseException
public static final void VariableInitializer(org.w3c.dom.Element parent)
throws ParseException
VariableInitializer:
ArrayInitializer
| Expression
parent - The parent of the examined node.
ParseException
public static final void ArrayInitializer(org.w3c.dom.Element parent)
throws ParseException
ArrayInitializer:
"{" [ VariableInitializer ( "," VariableInitializer )* ] [ "," ] "}"
parent - The parent of the examined node.
ParseException
public static final void MethodDeclaration(int modifiers,
org.w3c.dom.Element melem,
org.w3c.dom.Element parent)
throws ParseException
MethodDeclaration: [ TypeParameters ] ResultType MethodDeclarator [ ThrowsList ] ( Block | ";" )
modifiers - A modifier string.melem - The node corresponding to a modifier.parent - The parent of the examined node.
ParseException
public static final java.lang.String MethodDeclarator(org.w3c.dom.Element parent,
java.lang.String typeid)
throws ParseException
MethodDeclaratorFormalParameters ( "[" "]" )*
parent - The parent of the examined node.typeid - The id string of the type.
ParseException
public static final void ThrowsList(org.w3c.dom.Element parent)
throws ParseException
ThrowsList: "throws" ClassOrInterfaceType ( "," ClassOrInterfaceType )*
parent - The parent of the examined node.
ParseException
public static final void FormalParameters(org.w3c.dom.Element parent)
throws ParseException
FormalParameters:
"(" [ FormalParameter ( "," FormalParameter )* ] ")"
parent - The parent of the examined node.
ParseException
public static final void FormalParameter(org.w3c.dom.Element parent)
throws ParseException
FormalParameter: [ "final" ] Type [ "..." ] VariableDeclaratorId
parent - The parent of the examined node.
ParseException
public static final void ConstructorDeclaration(int modifiers,
org.w3c.dom.Element melem,
org.w3c.dom.Element parent)
throws ParseException
ConstructorDeclaration: [ TypeParameters() ]FormalParameters [ ThrowsList ] "{" [ ExplicitConstructorInvocation ] ( BlockStatement )* "}"
modifiers - A modifier string.melem - The node corresponding to a modifier.parent - The parent of the examined node.
ParseException
public static final void ExplicitConstructorInvocation(org.w3c.dom.Element parent)
throws ParseException
ExplicitConstructorInvocation: "this" Arguments ";" | [ PrimaryExpression "." ] "super" Arguments ";"
parent - The parent of the examined node.
ParseException
public static final void Initializer(org.w3c.dom.Element melem,
org.w3c.dom.Element parent)
throws ParseException
Initializer: [ "static" ] Block
melem - The node corresponding to a modifier.parent - The parent of the examined node.
ParseException
public static final java.lang.String Type(org.w3c.dom.Element parent)
throws ParseException
Type:
ReferenceType
| PrimitiveType
parent - The parent of the examined node.
ParseException
public static final java.lang.String ReferenceType(org.w3c.dom.Element parent)
throws ParseException
ReferenceType:
PrimitiveType ( "[" "]" )+
| ClassOrInterfaceType ( "[" "]" )*
parent - The parent of the examined node.
ParseException
public static final java.lang.String ClassOrInterfaceType(org.w3c.dom.Element parent)
throws ParseException
ClassOrInterfaceType:[ TypeArguments ] ( "." [ TypeArguments ] )*
parent - The parent of the examined node.
ParseException
public static final void TypeArguments(org.w3c.dom.Element parent)
throws ParseException
TypeArguments: "<" TypeArgument ( "," TypeArgument )* ">"
parent - The parent of the examined node.
ParseException
public static final void TypeArgument(org.w3c.dom.Element parent)
throws ParseException
TypeArgument:
ReferenceType
| "?" [ WildcardBounds ]
parent - The parent of the examined node.
ParseException
public static final java.lang.String WildcardBounds(org.w3c.dom.Element parent)
throws ParseException
WildcardBounds:
"extends" ReferenceType
| "super" ReferenceType
parent - The parent of the examined node.
ParseException
public static final java.lang.String PrimitiveType(org.w3c.dom.Element parent)
throws ParseException
PrimitiveType:
"boolean" | "char" | "byte" | "short" | "int"
| "long" | "float" | "double"
parent - The parent of the examined node.
ParseException
public static final java.lang.String ResultType(org.w3c.dom.Element parent)
throws ParseException
ResultType: "void" | Type
parent - The parent of the examined node.
ParseException
public static final java.lang.String QualifiedName(org.w3c.dom.Element parent)
throws ParseException
QualifiedName:( "." )*
parent - The parent of the examined node.
ParseException
public static final void Expression(org.w3c.dom.Element parent)
throws ParseException
Expression: ConditionalExpression [ AssignmentOperator Expression ]
parent - The parent of the examined node.
ParseException
public static final java.lang.String AssignmentOperator(org.w3c.dom.Element parent)
throws ParseException
AssignmentOperator:
"=" | "*=" | "/=" | "%=" | "+=" | "-="
| "<<=" | ">>=" | ">>>=" | "&=" | "^=" | "|="
parent - The parent of the examined node.
ParseException
public static final void ConditionalExpression(org.w3c.dom.Element parent)
throws ParseException
ConditionalExpression: ConditionalOrExpression [ "?" Expression ":" Expression ]
parent - The parent of the examined node.
ParseException
public static final void ConditionalOrExpression(org.w3c.dom.Element parent)
throws ParseException
ConditionalOrExpression: ConditionalAndExpression ( "||" ConditionalAndExpression )*
parent - The parent of the examined node.
ParseException
public static final void ConditionalAndExpression(org.w3c.dom.Element parent)
throws ParseException
ConditionalAndExpression: InclusiveOrExpression ( "&&" InclusiveOrExpression )*
parent - The parent of the examined node.
ParseException
public static final void InclusiveOrExpression(org.w3c.dom.Element parent)
throws ParseException
InclusiveOrExpression: ExclusiveOrExpression ( "|" ExclusiveOrExpression )*
parent - The parent of the examined node.
ParseException
public static final void ExclusiveOrExpression(org.w3c.dom.Element parent)
throws ParseException
ExclusiveOrExpression: AndExpression ( "^" AndExpression )*
parent - The parent of the examined node.
ParseException
public static final void AndExpression(org.w3c.dom.Element parent)
throws ParseException
AndExpression: EqualityExpression ( "&" EqualityExpression )*
parent - The parent of the examined node.
ParseException
public static final void EqualityExpression(org.w3c.dom.Element parent)
throws ParseException
EqualityExpression: InstanceOfExpression ( ( "==" | "!=" ) InstanceOfExpression )*
parent - The parent of the examined node.
ParseException
public static final void InstanceOfExpression(org.w3c.dom.Element parent)
throws ParseException
InstanceOfExpression: RelationalExpression [ "instanceof" Type ]
parent - The parent of the examined node.
ParseException
public static final void RelationalExpression(org.w3c.dom.Element parent)
throws ParseException
RelationalExpression: ShiftExpression ( ( "<" | ">" | "<=" | ">=" ) ShiftExpression )*
parent - The parent of the examined node.
ParseException
public static final void ShiftExpression(org.w3c.dom.Element parent)
throws ParseException
ShiftExpression: AdditiveExpression ( ( "<<" | RSIGNEDSHIFT | RUNSIGNEDSHIFT ) AdditiveExpression )*
parent - The parent of the examined node.
ParseException
public static final Token RSIGNEDSHIFT()
throws ParseException
">>"
ParseException
public static final Token RUNSIGNEDSHIFT()
throws ParseException
">>>"
ParseException
public static final void AdditiveExpression(org.w3c.dom.Element parent)
throws ParseException
AdditiveExpression: MultiplicativeExpression ( ( "+" | "-" ) MultiplicativeExpression )*
parent - The parent of the examined node.
ParseException
public static final void MultiplicativeExpression(org.w3c.dom.Element parent)
throws ParseException
MultiplicativeExpression: UnaryExpression ( ( "*" | "/" | "%" ) UnaryExpression )*
parent - The parent of the examined node.
ParseException
public static final void UnaryExpression(org.w3c.dom.Element parent)
throws ParseException
UnaryExpression:
( "+" | "-" ) UnaryExpression
| PreIncrementExpression
| PreDecrementExpression
| UnaryExpressionNotPlusMinus
parent - The parent of the examined node.
ParseException
public static final void PreIncrementExpression(org.w3c.dom.Element parent)
throws ParseException
PreIncrementExpression: "++" PrimaryExpression
parent - The parent of the examined node.
ParseException
public static final void PreDecrementExpression(org.w3c.dom.Element parent)
throws ParseException
PreDecrementExpression: "--" PrimaryExpression
parent - The parent of the examined node.
ParseException
public static final void UnaryExpressionNotPlusMinus(org.w3c.dom.Element parent)
throws ParseException
UnaryExpressionNotPlusMinus: ( "~" | "!" ) UnaryExpression | CastExpression | PostfixExpression
parent - The parent of the examined node.
ParseException
public static final void CastLookahead()
throws ParseException
ParseException
public static final void PostfixExpression(org.w3c.dom.Element parent)
throws ParseException
PostfixExpression: PrimaryExpression [ "++" | "--" ]
parent - The parent of the examined node.
ParseException
public static final void CastExpression(org.w3c.dom.Element parent)
throws ParseException
CastExpression:
"(" Type ")" UnaryExpression
| "(" Type ")" UnaryExpressionNotPlusMinus
parent - The parent of the examined node.
ParseException
public static final void PrimaryExpression(org.w3c.dom.Element parent)
throws ParseException
PrimaryExpression: PrimaryPrefix ( PrimarySuffix )*
parent - The parent of the examined node.
ParseException
public static final org.w3c.dom.Element PrimaryPrefix(org.w3c.dom.Element parent)
throws ParseException
PrimaryPrefix:
Literal
| "this"
| "super" "."
| "(" Expression ")"
| AllocationExpression
| ResultType "." "class"
| Name
parent - The parent of the examined node.
ParseException
public static final org.w3c.dom.Element PrimarySuffix(org.w3c.dom.Element parent)
throws ParseException
PrimarySuffix:
"." "this"
| "." "super"
| "." AllocationExpression
| MemberSelector
| "[" Expression "]"
| "."
| Arguments
parent - The parent of the examined node.
ParseException
public static final org.w3c.dom.Element Name()
throws ParseException
Name:( "." )*
ParseException
public static final org.w3c.dom.Element MemberSelector(org.w3c.dom.Element parent)
throws ParseException
MemberSelector: "." TypeArguments
parent - The parent of the examined node.
ParseException
public static final org.w3c.dom.Element Literal()
throws ParseException
Literal:
|
|
|
| BooleanLiteral
| NullLiteral
ParseException
public static final void BooleanLiteral(org.w3c.dom.Element parent)
throws ParseException
BooleanLiteral: ( "true" | "false" )
parent - The parent of the examined node.
ParseException
public static final void NullLiteral(org.w3c.dom.Element parent)
throws ParseException
BooleanLiteral: "null"
parent - The parent of the examined node.
ParseException
public static final void Arguments(org.w3c.dom.Element parent)
throws ParseException
Arguments:
"(" [ ArgumentList ] ")"
parent - The parent of the examined node.
ParseException
public static final void ArgumentList(org.w3c.dom.Element parent)
throws ParseException
ArgumentList: Expression ( "," Expression )*
parent - The parent of the examined node.
ParseException
public static final org.w3c.dom.Element AllocationExpression()
throws ParseException
AllocationExpression:
"new" PrimitiveType ArrayDimsAndInits
| "new" ClassOrInterfaceType [ TypeArguments ]
( ArrayDimsAndInits | Arguments [ ClassOrInterfaceBody ] )
ParseException
public static final void ArrayDimsAndInits(org.w3c.dom.Element parent)
throws ParseException
ArrayDimsAndInits:
( "[" Expression "]" )+ ( "[" "]" )*
| ( "[" "]" )+ ArrayInitializer
parent - The parent of the examined node.
ParseException
public static final void Statement(org.w3c.dom.Element parent)
throws ParseException
Statement:
LabeledStatement
| AssertStatement
| Block
| EmptyStatement
| StatementExpression0 ";"
| SwitchStatement
| IfStatement
| WhileStatement
| DoStatement
| ForStatement
| BreakStatement
| ContinueStatement
| ReturnStatement
| ThrowStatement
| SynchronizedStatement
| TryStatement
parent - The parent of the examined node.
ParseException
public static final void AssertStatement(org.w3c.dom.Element parent)
throws ParseException
AssertStatement: "assert" Expression [ ":" Expression ] ";"
parent - The parent of the examined node.
ParseException
public static final void LabeledStatement(org.w3c.dom.Element parent)
throws ParseException
LabeledStatement:":" Statement
parent - The parent of the examined node.
ParseException
public static final void Block(org.w3c.dom.Element parent)
throws ParseException
Block:
"{" ( BlockStatement )*
"}"
parent - The parent of the examined node.
ParseException
public static final void BlockStatement(org.w3c.dom.Element parent)
throws ParseException
BlockStatement:
LocalVariableDeclaration ";"
| Statement
| ClassDeclaration
| InterfaceDeclaration
parent - The parent of the examined node.
ParseException
public static final void LocalVariableDeclaration(org.w3c.dom.Element parent)
throws ParseException
LocalVariableDeclaration: [ "final" ] Type VariableDeclarator ( "," VariableDeclarator )*
parent - The parent of the examined node.
ParseException
public static final void EmptyStatement(org.w3c.dom.Element parent)
throws ParseException
EmptyStatement: ";"
parent - The parent of the examined node.
ParseException
public static final org.w3c.dom.Element StatementExpression0(org.w3c.dom.Element parent)
throws ParseException
StatementExpression0: StatementExpression
parent - The parent of the examined node.
ParseException
public static final void StatementExpression(org.w3c.dom.Element parent)
throws ParseException
StatementExpression:
PreIncrementExpression
| PreDecrementExpression
| PrimaryExpression [ "++" | "--" | AssignmentOperator Expression ]
parent - The parent of the examined node.
ParseException
public static final void SwitchStatement(org.w3c.dom.Element parent)
throws ParseException
SwitchStatement:
"switch" "(" Expression ")" "{"
( SwitchLabel ( BlockStatement )* )*
"}"
parent - The parent of the examined node.
ParseException
public static final void SwitchLabel(org.w3c.dom.Element parent)
throws ParseException
SwitchLabel:
"case" Expression ":"
| "default" ":"
parent - The parent of the examined node.
ParseException
public static final void IfStatement(org.w3c.dom.Element parent)
throws ParseException
IfStatement:
"if" "(" Expression ")" Statement [ "else" Statement ]
parent - The parent of the examined node.
ParseException
public static final void WhileStatement(org.w3c.dom.Element parent)
throws ParseException
WhileStatement:
"while" "(" Expression ")" Statement
parent - The parent of the examined node.
ParseException
public static final void DoStatement(org.w3c.dom.Element parent)
throws ParseException
DoStatement:
"do" Statement "while" "(" Expression ")" ";"
parent - The parent of the examined node.
ParseException
public static final void ForStatement(org.w3c.dom.Element parent)
throws ParseException
ForStatement:
"for" "("
( Type ":" Expression )
| [ ForInit ] ";" [ Expression ] ";" [ ForUpdate ]
) ")" Statement
parent - The parent of the examined node.
ParseException
public static final void ForInit(org.w3c.dom.Element parent)
throws ParseException
ForInit:
LocalVariableDeclaration
| StatementExpressionList
parent - The parent of the examined node.
ParseException
public static final void StatementExpressionList(org.w3c.dom.Element parent)
throws ParseException
StatementExpressionList: StatementExpression ( "," StatementExpression )*
parent - The parent of the examined node.
ParseException
public static final void ForUpdate(org.w3c.dom.Element parent)
throws ParseException
ForUpdate: StatementExpressionList
parent - The parent of the examined node.
ParseException
public static final void BreakStatement(org.w3c.dom.Element parent)
throws ParseException
BreakStatement: "break" [] ";"
parent - The parent of the examined node.
ParseException
public static final void ContinueStatement(org.w3c.dom.Element parent)
throws ParseException
ContinueStatement: "continue" [] ";"
parent - The parent of the examined node.
ParseException
public static final void ReturnStatement(org.w3c.dom.Element parent)
throws ParseException
ReturnStatement: "return" [ Expression(null) ] ";"
parent - The parent of the examined node.
ParseException
public static final void ThrowStatement(org.w3c.dom.Element parent)
throws ParseException
ThrowStatement: "throw" Expression ";"
parent - The parent of the examined node.
ParseException
public static final void SynchronizedStatement(org.w3c.dom.Element parent)
throws ParseException
SynchronizedStatement:
"synchronized" "(" Expression ")" Block
parent - The parent of the examined node.
ParseException
public static final void TryStatement(org.w3c.dom.Element parent)
throws ParseException
TryStatement:
"try" Block
( "catch" "(" FormalParameter ")" Block )*
[ "finally" Block ]
parent - The parent of the examined node.
ParseException
public static final void Annotation(org.w3c.dom.Element parent)
throws ParseException
Annotation:
NormalAnnotation
| SingleMemberAnnotation
| MarkerAnnotation
parent - The parent of the examined node.
ParseException
public static final void NormalAnnotation(org.w3c.dom.Element parent)
throws ParseException
NormalAnnotation:
"@" Name "(" [ MemberValuePairs ] ")"
parent - The parent of the examined node.
ParseException
public static final void MarkerAnnotation(org.w3c.dom.Element parent)
throws ParseException
MarkerAnnotation: "@" Name
parent - The parent of the examined node.
ParseException
public static final void SingleMemberAnnotation(org.w3c.dom.Element parent)
throws ParseException
SingleMemberAnnotation:
"@" Name "(" MemberValue ")"
parent - The parent of the examined node.
ParseException
public static final void MemberValuePairs(org.w3c.dom.Element parent)
throws ParseException
MemberValuePairs: MemberValuePair ( "," MemberValuePair )*
parent - The parent of the examined node.
ParseException
public static final void MemberValuePair(org.w3c.dom.Element parent)
throws ParseException
MemberValuePair:"=" MemberValue
parent - The parent of the examined node.
ParseException
public static final void MemberValue(org.w3c.dom.Element parent)
throws ParseException
MemberValue:
Annotation
| MemberValueArrayInitializer
| ConditionalExpression
parent - The parent of the examined node.
ParseException
public static final void MemberValueArrayInitializer(org.w3c.dom.Element parent)
throws ParseException
MemberValueArrayInitializer:
"{" MemberValue ( "," MemberValue )* [ "," ] "}"
parent - The parent of the examined node.
ParseException
public static final void AnnotationTypeDeclaration(int modifiers,
org.w3c.dom.Element melem,
org.w3c.dom.Element parent)
throws ParseException
AnnotationTypeDeclaration: "@" "interface"AnnotationTypeBody
parent - The parent of the examined node.
ParseException
public static final void AnnotationTypeBody(org.w3c.dom.Element parent)
throws ParseException
AnnotationTypeBody:
"{" ( AnnotationTypeMemberDeclaration )* "}"
parent - The parent of the examined node.
ParseException
public static final void AnnotationTypeMemberDeclaration(org.w3c.dom.Element parent)
throws ParseException
AnnotationTypeMemberDeclaration:
Modifiers
( Type "(" ")" [ DefaultValue ] ";"
| ClassDeclaration
| InterfaceDeclaration
| EnumDeclaration
| AnnotationTypeDeclaration
| FieldDeclaration
)
| ( ";" )
parent - The parent of the examined node.
ParseException
public static final void DefaultValue(org.w3c.dom.Element parent)
throws ParseException
DefaultValue: "default" MemberValue
parent - The parent of the examined node.
ParseExceptionpublic static void ReInit(java.io.InputStream stream)
public static void ReInit(java.io.Reader stream)
public void ReInit(JavaParserTokenManager tm)
public static final Token getNextToken()
public static final Token getToken(int index)
public static ParseException generateParseException()
public static final void enable_tracing()
public static final void disable_tracing()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||