openjava.mop
Class QueryEnvironment

java.lang.Object
  |
  +--openjava.mop.Environment
        |
        +--openjava.mop.ClosedEnvironment
              |
              +--openjava.mop.QueryEnvironment

public class QueryEnvironment
extends ClosedEnvironment

QueryEnvironment is the environment seen inside a QueryExpression. The 'variables' are the tables in the from list; it inherits stuff from the enclosing java environment, plus from enclosing queries. TBD: can queries in a from list inherit?


Nested Class Summary
 
Nested classes inherited from class openjava.mop.Environment
Environment.BasicVariableInfo, Environment.VariableInfo
 
Field Summary
private  QueryExpression query
           
 
Fields inherited from class openjava.mop.ClosedEnvironment
symbol_table, table
 
Fields inherited from class openjava.mop.Environment
parent
 
Constructor Summary
QueryEnvironment(Environment e, QueryExpression query)
           
 
Method Summary
 boolean isAggregating()
           
 boolean isBind(String name)
          Returns whether a name is a variable.
 Environment.VariableInfo lookupBind(String name)
          Looks up a binded type of the given variable or field name.
 Expression lookupFrom(String name)
           
 Expression lookupFrom(String name, int[] offset)
          Looks for a from-list item called name.
 
Methods inherited from class openjava.mop.ClosedEnvironment
bindVariable, lookupClass, record, toString
 
Methods inherited from class openjava.mop.Environment
bindVariable, currentClassName, getClassEnvironmentParent, getGlobalEnvironment, getPackage, getParent, isQualifiedName, isRegisteredModifier, lookupClass, recordMemberClass, toPackageName, toQualifiedName, toSimpleName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

query

private QueryExpression query
Constructor Detail

QueryEnvironment

public QueryEnvironment(Environment e,
                        QueryExpression query)
Method Detail

lookupBind

public Environment.VariableInfo lookupBind(String name)
Description copied from class: Environment
Looks up a binded type of the given variable or field name.

Overrides:
lookupBind in class ClosedEnvironment
Parameters:
name - the fully-qualified name of the class

isBind

public boolean isBind(String name)
Description copied from class: Environment
Returns whether a name is a variable. (In some situations, we cannot use Environment.lookupBind(java.lang.String), because the tree is not yet in a state where we can infer types.)

Overrides:
isBind in class Environment

lookupFrom

public Expression lookupFrom(String name,
                             int[] offset)
Looks for a from-list item called name.

Parameters:
name - name of from-list item
offset - writes the zero-based offset to offset[0] if the item is found
Returns:
the expression if found, null if not

lookupFrom

public Expression lookupFrom(String name)

isAggregating

public boolean isAggregating()

SourceForge.net_Logo