openjava.ptree.util
Class EvaluationShuttle
java.lang.Object
|
+--openjava.ptree.util.ParseTreeVisitor
|
+--openjava.ptree.util.EvaluationShuttle
- Direct Known Subclasses:
- ClassLiteralReplacer, ScopeHandler
- public abstract class EvaluationShuttle
- extends ParseTreeVisitor
The class EvaluationShuttle
is a Visitor role
in the Visitor pattern and this also visits each child
ParseTree
object from left to right.
The class Evaluator
is an evaluator of each
objects of ParseTree
family. Each methods in
this class is invoked from the class EvaluationShuttle
.
The method evaluateDown()
is invoked before evaluating
the children of the parse tree object, and evaluateUp()
is invoked after the evaluation.
- Since:
- %SOFTWARE% 1.0
- Version:
- 1.0
- Author:
- Michiaki Tatsubori
- See Also:
ParseTree
,
ParseTreeVisitor
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
env
private Environment env
EvaluationShuttle
public EvaluationShuttle(Environment env)
getEnvironment
protected Environment getEnvironment()
setEnvironment
protected void setEnvironment(Environment env)
evaluateDown
public Expression evaluateDown(AllocationExpression p)
throws ParseTreeException
ParseTreeException
evaluateDown
public Expression evaluateDown(ArrayAccess p)
throws ParseTreeException
ParseTreeException
evaluateDown
public Expression evaluateDown(ArrayAllocationExpression p)
throws ParseTreeException
ParseTreeException
evaluateDown
public VariableInitializer evaluateDown(ArrayInitializer p)
throws ParseTreeException
ParseTreeException
evaluateDown
public Expression evaluateDown(AssignmentExpression p)
throws ParseTreeException
ParseTreeException
evaluateDown
public Expression evaluateDown(BinaryExpression p)
throws ParseTreeException
ParseTreeException
evaluateDown
public Statement evaluateDown(Block p)
throws ParseTreeException
ParseTreeException
evaluateDown
public Statement evaluateDown(BreakStatement p)
throws ParseTreeException
ParseTreeException
evaluateDown
public CaseGroup evaluateDown(CaseGroup p)
throws ParseTreeException
ParseTreeException
evaluateDown
public CaseGroupList evaluateDown(CaseGroupList p)
throws ParseTreeException
ParseTreeException
evaluateDown
public CaseLabel evaluateDown(CaseLabel p)
throws ParseTreeException
ParseTreeException
evaluateDown
public CaseLabelList evaluateDown(CaseLabelList p)
throws ParseTreeException
ParseTreeException
evaluateDown
public Expression evaluateDown(CastExpression p)
throws ParseTreeException
ParseTreeException
evaluateDown
public CatchBlock evaluateDown(CatchBlock p)
throws ParseTreeException
ParseTreeException
evaluateDown
public CatchList evaluateDown(CatchList p)
throws ParseTreeException
ParseTreeException
evaluateDown
public ClassDeclaration evaluateDown(ClassDeclaration p)
throws ParseTreeException
ParseTreeException
evaluateDown
public ClassDeclarationList evaluateDown(ClassDeclarationList p)
throws ParseTreeException
ParseTreeException
evaluateDown
public Expression evaluateDown(ClassLiteral p)
throws ParseTreeException
ParseTreeException
evaluateDown
public CompilationUnit evaluateDown(CompilationUnit p)
throws ParseTreeException
ParseTreeException
evaluateDown
public Expression evaluateDown(ConditionalExpression p)
throws ParseTreeException
ParseTreeException
evaluateDown
public MemberDeclaration evaluateDown(ConstructorDeclaration p)
throws ParseTreeException
ParseTreeException
evaluateDown
public ConstructorInvocation evaluateDown(ConstructorInvocation p)
throws ParseTreeException
ParseTreeException
evaluateDown
public Statement evaluateDown(ContinueStatement p)
throws ParseTreeException
ParseTreeException
evaluateDown
public Statement evaluateDown(DoWhileStatement p)
throws ParseTreeException
ParseTreeException
evaluateDown
public Statement evaluateDown(EmptyStatement p)
throws ParseTreeException
ParseTreeException
evaluateDown
public ExpressionList evaluateDown(ExpressionList p)
throws ParseTreeException
ParseTreeException
evaluateDown
public Statement evaluateDown(ExpressionStatement p)
throws ParseTreeException
ParseTreeException
evaluateDown
public Expression evaluateDown(FieldAccess p)
throws ParseTreeException
ParseTreeException
evaluateDown
public MemberDeclaration evaluateDown(FieldDeclaration p)
throws ParseTreeException
ParseTreeException
evaluateDown
public Statement evaluateDown(ForStatement p)
throws ParseTreeException
ParseTreeException
evaluateDown
public Statement evaluateDown(IfStatement p)
throws ParseTreeException
ParseTreeException
evaluateDown
public Expression evaluateDown(InstanceofExpression p)
throws ParseTreeException
ParseTreeException
evaluateDown
public JoinExpression evaluateDown(JoinExpression p)
throws ParseTreeException
ParseTreeException
evaluateDown
public Statement evaluateDown(LabeledStatement p)
throws ParseTreeException
ParseTreeException
evaluateDown
public Expression evaluateDown(Literal p)
throws ParseTreeException
ParseTreeException
evaluateDown
public MemberDeclarationList evaluateDown(MemberDeclarationList p)
throws ParseTreeException
ParseTreeException
evaluateDown
public MemberDeclaration evaluateDown(MemberInitializer p)
throws ParseTreeException
ParseTreeException
evaluateDown
public Expression evaluateDown(MethodCall p)
throws ParseTreeException
ParseTreeException
evaluateDown
public MemberDeclaration evaluateDown(MethodDeclaration p)
throws ParseTreeException
ParseTreeException
evaluateDown
public ModifierList evaluateDown(ModifierList p)
throws ParseTreeException
ParseTreeException
evaluateDown
public Parameter evaluateDown(Parameter p)
throws ParseTreeException
ParseTreeException
evaluateDown
public ParameterList evaluateDown(ParameterList p)
throws ParseTreeException
ParseTreeException
evaluateDown
public Expression evaluateDown(QueryExpression p)
throws ParseTreeException
ParseTreeException
evaluateDown
public Statement evaluateDown(ReturnStatement p)
throws ParseTreeException
ParseTreeException
evaluateDown
public Expression evaluateDown(SelfAccess p)
throws ParseTreeException
ParseTreeException
evaluateDown
public StatementList evaluateDown(StatementList p)
throws ParseTreeException
ParseTreeException
evaluateDown
public Statement evaluateDown(SwitchStatement p)
throws ParseTreeException
ParseTreeException
evaluateDown
public Statement evaluateDown(SynchronizedStatement p)
throws ParseTreeException
ParseTreeException
evaluateDown
public Statement evaluateDown(ThrowStatement p)
throws ParseTreeException
ParseTreeException
evaluateDown
public Statement evaluateDown(TryStatement p)
throws ParseTreeException
ParseTreeException
evaluateDown
public TypeName evaluateDown(TypeName p)
throws ParseTreeException
ParseTreeException
evaluateDown
public Expression evaluateDown(UnaryExpression p)
throws ParseTreeException
ParseTreeException
evaluateDown
public Expression evaluateDown(Variable p)
throws ParseTreeException
ParseTreeException
evaluateDown
public Statement evaluateDown(VariableDeclaration p)
throws ParseTreeException
ParseTreeException
evaluateDown
public VariableDeclarator evaluateDown(VariableDeclarator p)
throws ParseTreeException
ParseTreeException
evaluateDown
public Statement evaluateDown(WhileStatement p)
throws ParseTreeException
ParseTreeException
evaluateDown
public Expression evaluateDown(AliasedExpression p)
throws ParseTreeException
ParseTreeException
evaluateDown
public Expression evaluateDown(InsertExpression p)
throws ParseTreeException
ParseTreeException
evaluateUp
public Expression evaluateUp(AllocationExpression p)
throws ParseTreeException
ParseTreeException
evaluateUp
public Expression evaluateUp(ArrayAccess p)
throws ParseTreeException
ParseTreeException
evaluateUp
public Expression evaluateUp(ArrayAllocationExpression p)
throws ParseTreeException
ParseTreeException
evaluateUp
public VariableInitializer evaluateUp(ArrayInitializer p)
throws ParseTreeException
ParseTreeException
evaluateUp
public Expression evaluateUp(AssignmentExpression p)
throws ParseTreeException
ParseTreeException
evaluateUp
public Expression evaluateUp(BinaryExpression p)
throws ParseTreeException
ParseTreeException
evaluateUp
public Statement evaluateUp(Block p)
throws ParseTreeException
ParseTreeException
evaluateUp
public Statement evaluateUp(BreakStatement p)
throws ParseTreeException
ParseTreeException
evaluateUp
public CaseGroup evaluateUp(CaseGroup p)
throws ParseTreeException
ParseTreeException
evaluateUp
public CaseGroupList evaluateUp(CaseGroupList p)
throws ParseTreeException
ParseTreeException
evaluateUp
public CaseLabel evaluateUp(CaseLabel p)
throws ParseTreeException
ParseTreeException
evaluateUp
public CaseLabelList evaluateUp(CaseLabelList p)
throws ParseTreeException
ParseTreeException
evaluateUp
public Expression evaluateUp(CastExpression p)
throws ParseTreeException
ParseTreeException
evaluateUp
public CatchBlock evaluateUp(CatchBlock p)
throws ParseTreeException
ParseTreeException
evaluateUp
public CatchList evaluateUp(CatchList p)
throws ParseTreeException
ParseTreeException
evaluateUp
public ClassDeclaration evaluateUp(ClassDeclaration p)
throws ParseTreeException
ParseTreeException
evaluateUp
public ClassDeclarationList evaluateUp(ClassDeclarationList p)
throws ParseTreeException
ParseTreeException
evaluateUp
public Expression evaluateUp(ClassLiteral p)
throws ParseTreeException
ParseTreeException
evaluateUp
public CompilationUnit evaluateUp(CompilationUnit p)
throws ParseTreeException
ParseTreeException
evaluateUp
public Expression evaluateUp(ConditionalExpression p)
throws ParseTreeException
ParseTreeException
evaluateUp
public MemberDeclaration evaluateUp(ConstructorDeclaration p)
throws ParseTreeException
ParseTreeException
evaluateUp
public ConstructorInvocation evaluateUp(ConstructorInvocation p)
throws ParseTreeException
ParseTreeException
evaluateUp
public Statement evaluateUp(ContinueStatement p)
throws ParseTreeException
ParseTreeException
evaluateUp
public Statement evaluateUp(DoWhileStatement p)
throws ParseTreeException
ParseTreeException
evaluateUp
public Statement evaluateUp(EmptyStatement p)
throws ParseTreeException
ParseTreeException
evaluateUp
public ExpressionList evaluateUp(ExpressionList p)
throws ParseTreeException
ParseTreeException
evaluateUp
public Statement evaluateUp(ExpressionStatement p)
throws ParseTreeException
ParseTreeException
evaluateUp
public Expression evaluateUp(FieldAccess p)
throws ParseTreeException
ParseTreeException
evaluateUp
public MemberDeclaration evaluateUp(FieldDeclaration p)
throws ParseTreeException
ParseTreeException
evaluateUp
public Statement evaluateUp(ForStatement p)
throws ParseTreeException
ParseTreeException
evaluateUp
public Statement evaluateUp(IfStatement p)
throws ParseTreeException
ParseTreeException
evaluateUp
public Expression evaluateUp(InstanceofExpression p)
throws ParseTreeException
ParseTreeException
evaluateUp
public Statement evaluateUp(LabeledStatement p)
throws ParseTreeException
ParseTreeException
evaluateUp
public Expression evaluateUp(Literal p)
throws ParseTreeException
ParseTreeException
evaluateUp
public MemberDeclarationList evaluateUp(MemberDeclarationList p)
throws ParseTreeException
ParseTreeException
evaluateUp
public MemberDeclaration evaluateUp(MemberInitializer p)
throws ParseTreeException
ParseTreeException
evaluateUp
public Expression evaluateUp(MethodCall p)
throws ParseTreeException
ParseTreeException
evaluateUp
public MemberDeclaration evaluateUp(MethodDeclaration p)
throws ParseTreeException
ParseTreeException
evaluateUp
public ModifierList evaluateUp(ModifierList p)
throws ParseTreeException
ParseTreeException
evaluateUp
public Parameter evaluateUp(Parameter p)
throws ParseTreeException
ParseTreeException
evaluateUp
public ParameterList evaluateUp(ParameterList p)
throws ParseTreeException
ParseTreeException
evaluateUp
public Statement evaluateUp(ReturnStatement p)
throws ParseTreeException
ParseTreeException
evaluateUp
public Expression evaluateUp(SelfAccess p)
throws ParseTreeException
ParseTreeException
evaluateUp
public StatementList evaluateUp(StatementList p)
throws ParseTreeException
ParseTreeException
evaluateUp
public Statement evaluateUp(SwitchStatement p)
throws ParseTreeException
ParseTreeException
evaluateUp
public Statement evaluateUp(SynchronizedStatement p)
throws ParseTreeException
ParseTreeException
evaluateUp
public Statement evaluateUp(ThrowStatement p)
throws ParseTreeException
ParseTreeException
evaluateUp
public Statement evaluateUp(TryStatement p)
throws ParseTreeException
ParseTreeException
evaluateUp
public TypeName evaluateUp(TypeName p)
throws ParseTreeException
ParseTreeException
evaluateUp
public Expression evaluateUp(UnaryExpression p)
throws ParseTreeException
ParseTreeException
evaluateUp
public Expression evaluateUp(Variable p)
throws ParseTreeException
ParseTreeException
evaluateUp
public Statement evaluateUp(VariableDeclaration p)
throws ParseTreeException
ParseTreeException
evaluateUp
public VariableDeclarator evaluateUp(VariableDeclarator p)
throws ParseTreeException
ParseTreeException
evaluateUp
public Statement evaluateUp(WhileStatement p)
throws ParseTreeException
ParseTreeException
evaluateUp
public Expression evaluateUp(QueryExpression p)
throws ParseTreeException
ParseTreeException
evaluateUp
public JoinExpression evaluateUp(JoinExpression p)
throws ParseTreeException
ParseTreeException
evaluateUp
public Expression evaluateUp(AliasedExpression p)
throws ParseTreeException
ParseTreeException
evaluateUp
public Expression evaluateUp(InsertExpression p)
throws ParseTreeException
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(JoinExpression 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(InsertExpression p)
throws ParseTreeException
- Specified by:
visit
in class ParseTreeVisitor
ParseTreeException