| java.lang.Object xtc.lang.javacc.visitor.ObjectDepthFirst
ObjectDepthFirst | public class ObjectDepthFirst implements ObjectVisitor(Code) | | Provides default methods which visit each node in the tree in depth-first
order. Your visitors may extend this class.
|
Method Summary | |
public Object | visit(NodeList n, Object argu) | public Object | visit(NodeListOptional n, Object argu) | public Object | visit(NodeOptional n, Object argu) | public Object | visit(NodeSequence n, Object argu) | public Object | visit(NodeToken n, Object argu) | public Object | visit(CompilationUnit n, Object argu) Visit the specified node. | public Object | visit(PackageDeclaration n, Object argu) Visit the specified node. | public Object | visit(ImportDeclaration n, Object argu) Visit the specified node. | public Object | visit(TypeDeclaration n, Object argu) Visit the specified node. | public Object | visit(ClassDeclaration n, Object argu) Visit the specified node. | public Object | visit(UnmodifiedClassDeclaration n, Object argu) Visit the specified node. | public Object | visit(ClassBody n, Object argu) Visit the specified node. | public Object | visit(NestedClassDeclaration n, Object argu) Visit the specified node. | public Object | visit(ClassBodyDeclaration n, Object argu) Visit the specified node. | public Object | visit(MethodDeclarationLookahead n, Object argu) Visit the specified node. | public Object | visit(InterfaceDeclaration n, Object argu) Visit the specified node. | public Object | visit(NestedInterfaceDeclaration n, Object argu) Visit the specified node. | public Object | visit(UnmodifiedInterfaceDeclaration n, Object argu) Visit the specified node. | public Object | visit(InterfaceMemberDeclaration n, Object argu) Visit the specified node. | public Object | visit(FieldDeclaration n, Object argu) Visit the specified node. | public Object | visit(VariableDeclarator n, Object argu) Visit the specified node. | public Object | visit(VariableDeclaratorId n, Object argu) Visit the specified node. | public Object | visit(VariableInitializer n, Object argu) Visit the specified node. | public Object | visit(ArrayInitializer n, Object argu) Visit the specified node. | public Object | visit(MethodDeclaration n, Object argu) Visit the specified node. | public Object | visit(MethodDeclarator n, Object argu) Visit the specified node. | public Object | visit(FormalParameters n, Object argu) Visit the specified node. | public Object | visit(FormalParameter n, Object argu) Visit the specified node. | public Object | visit(ConstructorDeclaration n, Object argu) Visit the specified node. | public Object | visit(ExplicitConstructorInvocation n, Object argu) Visit the specified node. | public Object | visit(Initializer n, Object argu) Visit the specified node. | public Object | visit(Type n, Object argu) Visit the specified node. | public Object | visit(PrimitiveType n, Object argu) Visit the specified node. | public Object | visit(ResultType n, Object argu) Visit the specified node. | public Object | visit(Name n, Object argu) Visit the specified node. | public Object | visit(NameList n, Object argu) Visit the specified node. | public Object | visit(Expression n, Object argu) Visit the specified node. | public Object | visit(AssignmentOperator n, Object argu) Visit the specified node. | public Object | visit(ConditionalExpression n, Object argu) Visit the specified node. | public Object | visit(ConditionalOrExpression n, Object argu) Visit the specified node. | public Object | visit(ConditionalAndExpression n, Object argu) Visit the specified node. | public Object | visit(InclusiveOrExpression n, Object argu) Visit the specified node. | public Object | visit(ExclusiveOrExpression n, Object argu) Visit the specified node. | public Object | visit(AndExpression n, Object argu) Visit the specified node. | public Object | visit(EqualityExpression n, Object argu) Visit the specified node. | public Object | visit(InstanceOfExpression n, Object argu) Visit the specified node. | public Object | visit(RelationalExpression n, Object argu) Visit the specified node. | public Object | visit(ShiftExpression n, Object argu) Visit the specified node. | public Object | visit(AdditiveExpression n, Object argu) Visit the specified node. | public Object | visit(MultiplicativeExpression n, Object argu) Visit the specified node. | public Object | visit(UnaryExpression n, Object argu) Visit the specified node. | public Object | visit(PreIncrementExpression n, Object argu) Visit the specified node. | public Object | visit(PreDecrementExpression n, Object argu) Visit the specified node. | public Object | visit(UnaryExpressionNotPlusMinus n, Object argu) Visit the specified node. | public Object | visit(CastLookahead n, Object argu) Visit the specified node. | public Object | visit(PostfixExpression n, Object argu) Visit the specified node. | public Object | visit(CastExpression n, Object argu) Visit the specified node. | public Object | visit(PrimaryExpression n, Object argu) Visit the specified node. | public Object | visit(PrimaryPrefix n, Object argu) Visit the specified node. | public Object | visit(PrimarySuffix n, Object argu) Visit the specified node. | public Object | visit(Literal n, Object argu) Visit the specified node. | public Object | visit(BooleanLiteral n, Object argu) Visit the specified node. | public Object | visit(NullLiteral n, Object argu) Visit the specified node. | public Object | visit(Arguments n, Object argu) Visit the specified node. | public Object | visit(ArgumentList n, Object argu) Visit the specified node. | public Object | visit(AllocationExpression n, Object argu) Visit the specified node. | public Object | visit(ArrayDimsAndInits n, Object argu) Visit the specified node. | public Object | visit(Statement n, Object argu) Visit the specified node. | public Object | visit(LabeledStatement n, Object argu) Visit the specified node. | public Object | visit(Block n, Object argu) Visit the specified node. | public Object | visit(BlockStatement n, Object argu) Visit the specified node. | public Object | visit(LocalVariableDeclaration n, Object argu) Visit the specified node. | public Object | visit(EmptyStatement n, Object argu) Visit the specified node. | public Object | visit(StatementExpression n, Object argu) Visit the specified node. | public Object | visit(SwitchStatement n, Object argu) Visit the specified node. | public Object | visit(SwitchLabel n, Object argu) Visit the specified node. | public Object | visit(IfStatement n, Object argu) Visit the specified node. | public Object | visit(WhileStatement n, Object argu) Visit the specified node. | public Object | visit(DoStatement n, Object argu) Visit the specified node. | public Object | visit(ForStatement n, Object argu) Visit the specified node. | public Object | visit(ForInit n, Object argu) Visit the specified node. | public Object | visit(StatementExpressionList n, Object argu) Visit the specified node. | public Object | visit(ForUpdate n, Object argu) Visit the specified node. | public Object | visit(BreakStatement n, Object argu) Visit the specified node. | public Object | visit(ContinueStatement n, Object argu) Visit the specified node. | public Object | visit(ReturnStatement n, Object argu) Visit the specified node. | public Object | visit(ThrowStatement n, Object argu) Visit the specified node. | public Object | visit(SynchronizedStatement n, Object argu) Visit the specified node. | public Object | visit(TryStatement n, Object argu) Visit the specified node. | public Object | visit(AssertStatement n, Object argu) Visit the specified node. |
visit | public Object visit(CompilationUnit n, Object argu)(Code) | | Visit the specified node.
f0 -> [ PackageDeclaration() ]
f1 -> ( ImportDeclaration() )*
f2 -> ( TypeDeclaration() )*
f3 -> <EOF>
|
visit | public Object visit(ClassDeclaration n, Object argu)(Code) | | Visit the specified node.
f0 -> ( "abstract" | "final" | "public" | "strictfp" )*
f1 -> UnmodifiedClassDeclaration()
|
visit | public Object visit(ClassBody n, Object argu)(Code) | | Visit the specified node.
f0 -> "{"
f1 -> ( ClassBodyDeclaration() )*
f2 -> "}"
|
visit | public Object visit(NestedClassDeclaration n, Object argu)(Code) | | Visit the specified node.
f0 -> ( "static" | "abstract" | "final" | "public" | "protected" | "private" | "strictfp" )*
f1 -> UnmodifiedClassDeclaration()
|
visit | public Object visit(ClassBodyDeclaration n, Object argu)(Code) | | Visit the specified node.
f0 -> Initializer()
| NestedClassDeclaration()
| NestedInterfaceDeclaration()
| ConstructorDeclaration()
| MethodDeclaration()
| FieldDeclaration()
| ";"
|
visit | public Object visit(MethodDeclarationLookahead n, Object argu)(Code) | | Visit the specified node.
f0 -> ( "public" | "protected" | "private" | "static" | "abstract" | "final" | "native" | "synchronized" | "strictfp" )*
f1 -> ResultType()
f2 -> <IDENTIFIER>
f3 -> "("
|
visit | public Object visit(NestedInterfaceDeclaration n, Object argu)(Code) | | Visit the specified node.
f0 -> ( "static" | "abstract" | "final" | "public" | "protected" | "private" | "strictfp" )*
f1 -> UnmodifiedInterfaceDeclaration()
|
visit | public Object visit(FieldDeclaration n, Object argu)(Code) | | Visit the specified node.
f0 -> ( "public" | "protected" | "private" | "static" | "final" | "transient" | "volatile" )*
f1 -> Type()
f2 -> VariableDeclarator()
f3 -> ( "," VariableDeclarator() )*
f4 -> ";"
|
visit | public Object visit(ArrayInitializer n, Object argu)(Code) | | Visit the specified node.
f0 -> "{"
f1 -> [ VariableInitializer() ( "," VariableInitializer() )* ]
f2 -> [ "," ]
f3 -> "}"
|
visit | public Object visit(MethodDeclaration n, Object argu)(Code) | | Visit the specified node.
f0 -> ( "public" | "protected" | "private" | "static" | "abstract" | "final" | "native" | "synchronized" | "strictfp" )*
f1 -> ResultType()
f2 -> MethodDeclarator()
f3 -> [ "throws" NameList() ]
f4 -> ( Block() | ";" )
|
visit | public Object visit(ConstructorDeclaration n, Object argu)(Code) | | Visit the specified node.
f0 -> [ "public" | "protected" | "private" ]
f1 -> <IDENTIFIER>
f2 -> FormalParameters()
f3 -> [ "throws" NameList() ]
f4 -> "{"
f5 -> [ ExplicitConstructorInvocation() ]
f6 -> ( BlockStatement() )*
f7 -> "}"
|
visit | public Object visit(Type n, Object argu)(Code) | | Visit the specified node.
f0 -> ( PrimitiveType() | Name() )
f1 -> ( "[" "]" )*
|
visit | public Object visit(PrimitiveType n, Object argu)(Code) | | Visit the specified node.
f0 -> "boolean"
| "char"
| "byte"
| "short"
| "int"
| "long"
| "float"
| "double"
|
visit | public Object visit(Name n, Object argu)(Code) | | Visit the specified node.
f0 -> <IDENTIFIER>
f1 -> ( "." <IDENTIFIER> )*
|
visit | public Object visit(Expression n, Object argu)(Code) | | Visit the specified node.
f0 -> ConditionalExpression()
f1 -> [ AssignmentOperator() Expression() ]
|
visit | public Object visit(AssignmentOperator n, Object argu)(Code) | | Visit the specified node.
f0 -> "="
| "*="
| "/="
| "%="
| "+="
| "-="
| "<<="
| ">>="
| ">>>="
| "&="
| "^="
| "|="
|
visit | public Object visit(ShiftExpression n, Object argu)(Code) | | Visit the specified node.
f0 -> AdditiveExpression()
f1 -> ( ( "<<" | ">>" | ">>>" ) AdditiveExpression() )*
|
visit | public Object visit(UnaryExpression n, Object argu)(Code) | | Visit the specified node.
f0 -> ( "+" | "-" ) UnaryExpression()
| PreIncrementExpression()
| PreDecrementExpression()
| UnaryExpressionNotPlusMinus()
|
visit | public Object visit(CastLookahead n, Object argu)(Code) | | Visit the specified node.
f0 -> "(" PrimitiveType()
| "(" Name() "[" "]"
| "(" Name() ")" ( "~" | "!" | "(" | <IDENTIFIER> | "this" | "super" | "new" | Literal() )
|
visit | public Object visit(CastExpression n, Object argu)(Code) | | Visit the specified node.
f0 -> "(" Type() ")" UnaryExpression()
| "(" Type() ")" UnaryExpressionNotPlusMinus()
|
visit | public Object visit(PrimaryPrefix n, Object argu)(Code) | | Visit the specified node.
f0 -> Literal()
| "this"
| "super" "." <IDENTIFIER>
| "(" Expression() ")"
| AllocationExpression()
| ResultType() "." "class"
| Name()
|
visit | public Object visit(PrimarySuffix n, Object argu)(Code) | | Visit the specified node.
f0 -> "." "this"
| "." "super"
| "." AllocationExpression()
| "[" Expression() "]"
| "." <IDENTIFIER>
| Arguments()
|
visit | public Object visit(Literal n, Object argu)(Code) | | Visit the specified node.
f0 -> <INTEGER_LITERAL>
| <FLOATING_POINT_LITERAL>
| <CHARACTER_LITERAL>
| <STRING_LITERAL>
| BooleanLiteral()
| NullLiteral()
|
visit | public Object visit(AllocationExpression n, Object argu)(Code) | | Visit the specified node.
f0 -> "new" PrimitiveType() ArrayDimsAndInits()
| "new" Name() ( ArrayDimsAndInits() | Arguments() [ ClassBody() ] )
|
visit | public Object visit(Statement n, Object argu)(Code) | | Visit the specified node.
f0 -> LabeledStatement()
| Block()
| EmptyStatement()
| StatementExpression() ";"
| SwitchStatement()
| IfStatement()
| WhileStatement()
| DoStatement()
| ForStatement()
| BreakStatement()
| ContinueStatement()
| ReturnStatement()
| ThrowStatement()
| SynchronizedStatement()
| TryStatement()
| AssertStatement()
|
visit | public Object visit(Block n, Object argu)(Code) | | Visit the specified node.
f0 -> "{"
f1 -> ( BlockStatement() )*
f2 -> "}"
|
visit | public Object visit(BlockStatement n, Object argu)(Code) | | Visit the specified node.
f0 -> LocalVariableDeclaration() ";"
| Statement()
| UnmodifiedClassDeclaration()
| UnmodifiedInterfaceDeclaration()
|
visit | public Object visit(StatementExpression n, Object argu)(Code) | | Visit the specified node.
f0 -> PreIncrementExpression()
| PreDecrementExpression()
| PrimaryExpression() [ "++" | "--" | AssignmentOperator() Expression() ]
|
visit | public Object visit(SwitchStatement n, Object argu)(Code) | | Visit the specified node.
f0 -> "switch"
f1 -> "("
f2 -> Expression()
f3 -> ")"
f4 -> "{"
f5 -> ( SwitchLabel() ( BlockStatement() )* )*
f6 -> "}"
|
visit | public Object visit(IfStatement n, Object argu)(Code) | | Visit the specified node.
f0 -> "if"
f1 -> "("
f2 -> Expression()
f3 -> ")"
f4 -> Statement()
f5 -> [ "else" Statement() ]
|
visit | public Object visit(DoStatement n, Object argu)(Code) | | Visit the specified node.
f0 -> "do"
f1 -> Statement()
f2 -> "while"
f3 -> "("
f4 -> Expression()
f5 -> ")"
f6 -> ";"
|
visit | public Object visit(ForStatement n, Object argu)(Code) | | Visit the specified node.
f0 -> "for"
f1 -> "("
f2 -> [ ForInit() ]
f3 -> ";"
f4 -> [ Expression() ]
f5 -> ";"
f6 -> [ ForUpdate() ]
f7 -> ")"
f8 -> Statement()
|
visit | public Object visit(ForInit n, Object argu)(Code) | | Visit the specified node.
f0 -> LocalVariableDeclaration()
| StatementExpressionList()
|
visit | public Object visit(TryStatement n, Object argu)(Code) | | Visit the specified node.
f0 -> "try"
f1 -> Block()
f2 -> ( "catch" "(" FormalParameter() ")" Block() )*
f3 -> [ "finally" Block() ]
|
|
|