saffron.util
Class SaffronValidator

java.lang.Object
  |
  +--openjava.ptree.util.ParseTreeVisitor
        |
        +--openjava.ptree.util.EvaluationShuttle
              |
              +--openjava.ptree.util.ScopeHandler
                    |
                    +--openjava.ptree.util.VariableBinder
                          |
                          +--saffron.util.SaffronValidator

public class SaffronValidator
extends VariableBinder

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

Since:
25 April, 2002
Version:
$Id: //open/saffron/src/main/saffron/util/SaffronValidator.java#2 $
Author:
jhyde

Field Summary
 
Fields inherited from class openjava.ptree.util.ScopeHandler
 
Fields inherited from class openjava.ptree.util.EvaluationShuttle
 
Constructor Summary
SaffronValidator(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, 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
 
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

SaffronValidator

public SaffronValidator(Environment env)
Method Detail

evaluateUp

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

fieldExists

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

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

SourceForge.net_Logo