openjava.ptree.util
Class GenericVisitor

java.lang.Object
  |
  +--openjava.ptree.util.ParseTreeVisitor
        |
        +--openjava.ptree.util.GenericVisitor

public abstract class GenericVisitor
extends ParseTreeVisitor

The class GenericVisitor is a Visitor role in the Visitor pattern and visits ParseTree objects as the role of Element. All of the visit methods of the base class, ParseTreeVisitor, redirect to a the ParseTreeVisitor.visit(ParseTree) method. A derived class can override this method to treat all nodes uniformly.

Since:
%SOFTWARE% 1.0
Version:
1.0
Author:
Julian Hyde
See Also:
ParseTree

Constructor Summary
GenericVisitor()
           
 
Method Summary
 void visit(AliasedExpression p)
           
 void visit(AllocationExpression p)
           
 void visit(ArrayAccess p)
           
 void visit(ArrayAllocationExpression p)
           
 void visit(ArrayInitializer p)
           
 void visit(AssignmentExpression p)
           
 void visit(BinaryExpression p)
           
 void visit(Block p)
           
 void visit(BreakStatement p)
           
 void visit(CaseGroup p)
           
 void visit(CaseGroupList p)
           
 void visit(CaseLabel p)
           
 void visit(CaseLabelList p)
           
 void visit(CastExpression p)
           
 void visit(CatchBlock p)
           
 void visit(CatchList p)
           
 void visit(ClassDeclaration p)
           
 void visit(ClassDeclarationList p)
           
 void visit(ClassLiteral p)
           
 void visit(CompilationUnit p)
           
 void visit(ConditionalExpression p)
           
 void visit(ConstructorDeclaration p)
           
 void visit(ConstructorInvocation p)
           
 void visit(ContinueStatement p)
           
 void visit(DoWhileStatement p)
           
 void visit(EmptyStatement p)
           
 void visit(Expression p)
           
 void visit(ExpressionList p)
           
 void visit(ExpressionStatement p)
           
 void visit(FieldAccess p)
           
 void visit(FieldDeclaration p)
           
 void visit(ForStatement p)
           
 void visit(IfStatement p)
           
 void visit(InsertExpression p)
           
 void visit(InstanceofExpression p)
           
 void visit(JoinExpression p)
           
 void visit(LabeledStatement p)
           
 void visit(Leaf p)
           
 void visit(List p)
           
 void visit(Literal p)
           
 void visit(MemberDeclaration p)
           
 void visit(MemberDeclarationList p)
           
 void visit(MemberInitializer p)
           
 void visit(MethodCall p)
           
 void visit(MethodDeclaration p)
           
 void visit(ModifierList p)
           
 void visit(NonLeaf p)
           
 void visit(Parameter p)
           
 void visit(ParameterList p)
           
 void visit(ParseTreeObject p)
           
 void visit(QueryExpression p)
           
 void visit(ReturnStatement p)
           
 void visit(SelfAccess p)
           
 void visit(Statement p)
           
 void visit(StatementList p)
           
 void visit(SwitchStatement p)
           
 void visit(SynchronizedStatement p)
           
 void visit(ThrowStatement p)
           
 void visit(TryStatement p)
           
 void visit(TypeName p)
           
 void visit(UnaryExpression p)
           
 void visit(Variable p)
           
 void visit(VariableDeclaration p)
           
 void visit(VariableDeclarator p)
           
 void visit(VariableInitializer p)
           
 void visit(WhileStatement p)
           
 void visitGeneric(ParseTree p)
          Processes a ParseTree node.
 
Methods inherited from class openjava.ptree.util.ParseTreeVisitor
visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericVisitor

public GenericVisitor()
Method Detail

visitGeneric

public void visitGeneric(ParseTree p)
                  throws ParseTreeException
Processes a ParseTree node. All other visit methods call this one.

ParseTreeException

visit

public void visit(ParseTreeObject p)
           throws ParseTreeException
Overrides:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(NonLeaf p)
           throws ParseTreeException
Overrides:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(Leaf p)
           throws ParseTreeException
Overrides:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(MemberDeclaration p)
           throws ParseTreeException
Overrides:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(Statement p)
           throws ParseTreeException
Overrides:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(Expression p)
           throws ParseTreeException
Overrides:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(VariableInitializer p)
           throws ParseTreeException
Overrides:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(List p)
           throws ParseTreeException
Overrides:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(AllocationExpression p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(ArrayAccess p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(ArrayAllocationExpression p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(ArrayInitializer p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(AssignmentExpression p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(BinaryExpression p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(Block p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(BreakStatement p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(CaseGroup p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(CaseGroupList p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(CaseLabel p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(CaseLabelList p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(CastExpression p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(CatchBlock p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(CatchList p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(ClassDeclaration p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(ClassDeclarationList p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(ClassLiteral p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(CompilationUnit p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(ConditionalExpression p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(ConstructorDeclaration p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(ConstructorInvocation p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(ContinueStatement p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(DoWhileStatement p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(EmptyStatement p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(ExpressionList p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(ExpressionStatement p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(FieldAccess p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(FieldDeclaration p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(ForStatement p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(IfStatement p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(InstanceofExpression p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(LabeledStatement p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(Literal p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(MemberDeclarationList p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(MemberInitializer p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(MethodCall p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(MethodDeclaration p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(ModifierList p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(Parameter p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(ParameterList p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(ReturnStatement p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(SelfAccess p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(StatementList p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(SwitchStatement p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(SynchronizedStatement p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(ThrowStatement p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(TryStatement p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(TypeName p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(UnaryExpression p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(Variable p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(VariableDeclaration p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(VariableDeclarator p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(WhileStatement p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(QueryExpression p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(AliasedExpression p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(JoinExpression p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

visit

public void visit(InsertExpression p)
           throws ParseTreeException
Specified by:
visit in class ParseTreeVisitor
ParseTreeException

SourceForge.net_Logo