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?
| Methods inherited from class openjava.mop.Environment |
bindVariable, currentClassName, getClassEnvironmentParent, getGlobalEnvironment, getPackage, getParent, isQualifiedName, isRegisteredModifier, lookupClass, recordMemberClass, toPackageName, toQualifiedName, toSimpleName |
query
private QueryExpression query
QueryEnvironment
public QueryEnvironment(Environment e,
QueryExpression query)
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 itemoffset - 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()