openjava.ptree.util
Class VariableBinder

java.lang.Object
  |
  +--openjava.ptree.util.ParseTreeVisitor
        |
        +--openjava.ptree.util.EvaluationShuttle
              |
              +--openjava.ptree.util.ScopeHandler
                    |
                    +--openjava.ptree.util.VariableBinder
Direct Known Subclasses:
ExpansionApplier, MemberAccessCorrector, OJSchemaExpander, OJValidator

public class VariableBinder
extends ScopeHandler

Extension to ScopeHandler which adds variables to the current environment as their declarations are enountered.

Since:
%SOFTWARE% 1.0
Version:
1.0
Author:
Michiaki Tatsubori
See Also:
Object

Field Summary
 
Fields inherited from class openjava.ptree.util.ScopeHandler
 
Fields inherited from class openjava.ptree.util.EvaluationShuttle
 
Constructor Summary
VariableBinder(Environment env)
           
 
Method Summary
private static void bindForInit(TypeName tspec, VariableDeclarator[] vdecls, Environment env)
           
private static void bindLocalVariable(VariableDeclaration var_decl, Environment env)
           
private static void bindName(Environment env, String type, String name)
           
private static void bindParameter(Parameter param, Environment env)
           
 Statement evaluateDown(ForStatement ptree)
           
 Parameter evaluateDown(Parameter ptree)
           
 Statement evaluateDown(VariableDeclaration ptree)
           
 
Methods inherited from class openjava.ptree.util.ScopeHandler
evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, pop, push, pushClosedEnvironment
 
Methods inherited from class openjava.ptree.util.EvaluationShuttle
evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, getEnvironment, setEnvironment, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
 
Methods inherited from class openjava.ptree.util.ParseTreeVisitor
visit, visit, visit, visit, visit, visit, visit, visit, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VariableBinder

public VariableBinder(Environment env)
Method Detail

evaluateDown

public Statement evaluateDown(VariableDeclaration ptree)
                       throws ParseTreeException
Overrides:
evaluateDown in class EvaluationShuttle
ParseTreeException

evaluateDown

public Statement evaluateDown(ForStatement ptree)
                       throws ParseTreeException
Overrides:
evaluateDown in class ScopeHandler
ParseTreeException

evaluateDown

public Parameter evaluateDown(Parameter ptree)
                       throws ParseTreeException
Overrides:
evaluateDown in class EvaluationShuttle
ParseTreeException

bindLocalVariable

private static void bindLocalVariable(VariableDeclaration var_decl,
                                      Environment env)

bindForInit

private static void bindForInit(TypeName tspec,
                                VariableDeclarator[] vdecls,
                                Environment env)

bindParameter

private static void bindParameter(Parameter param,
                                  Environment env)

bindName

private static void bindName(Environment env,
                             String type,
                             String name)

SourceForge.net_Logo