net.sf.saffron.oj
Class OJValidator

java.lang.Object
  |
  +--openjava.ptree.util.ParseTreeVisitor
        |
        +--openjava.ptree.util.EvaluationShuttle
              |
              +--openjava.ptree.util.ScopeHandler
                    |
                    +--openjava.ptree.util.VariableBinder
                          |
                          +--net.sf.saffron.oj.OJValidator

public class OJValidator
extends VariableBinder

OJValidator makes sure that an expression is valid. It produces more meaningful error messages than code further down the line (for example OJQueryExpander) would produce.

Since:
25 April, 2002
Version:
$Id: //open/saffron/src/net/sf/saffron/oj/OJValidator.java#2 $
Author:
jhyde

Field Summary
 
Fields inherited from class openjava.ptree.util.ScopeHandler
 
Fields inherited from class openjava.ptree.util.EvaluationShuttle
 
Constructor Summary
OJValidator(Environment env)
           
 
Method Summary
 Expression evaluateUp(FieldAccess p)
           
 Expression evaluateUp(MethodCall p)
           
 TypeName evaluateUp(TypeName p)
           
private  boolean fieldExists(ParseTree expr, String name, Environment env)
           
 
Methods inherited from class openjava.ptree.util.VariableBinder
evaluateDown, evaluateDown, evaluateDown
 
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, 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

OJValidator

public OJValidator(Environment env)
Method Detail

evaluateUp

public Expression evaluateUp(FieldAccess p)
                      throws ParseTreeException
Overrides:
evaluateUp in class EvaluationShuttle
ParseTreeException

evaluateUp

public Expression evaluateUp(MethodCall p)
                      throws ParseTreeException
Overrides:
evaluateUp in class EvaluationShuttle
ParseTreeException

evaluateUp

public TypeName evaluateUp(TypeName p)
                    throws ParseTreeException
Overrides:
evaluateUp in class EvaluationShuttle
ParseTreeException

fieldExists

private boolean fieldExists(ParseTree expr,
                            String name,
                            Environment env)

SourceForge.net_Logo