saffron.util
Class RelEnvironment

java.lang.Object
  |
  +--openjava.mop.Environment
        |
        +--saffron.util.RelEnvironment

public class RelEnvironment
extends Environment

RelEnvironment defines the set of variables available to a relational expression.


Nested Class Summary
 
Nested classes inherited from class openjava.mop.Environment
Environment.BasicVariableInfo, Environment.VariableInfo
 
Field Summary
(package private)  Rel rel
           
private static Variable var0
           
private static Variable var1
           
 
Fields inherited from class openjava.mop.Environment
parent
 
Constructor Summary
RelEnvironment(Environment parent, Rel rel)
           
 
Method Summary
 void bindVariable(String name, Environment.VariableInfo info)
          Binds the name of a variable to information about the variable, including its class.
static int getInputOrdinal(String name)
          Returns the ordinal of the input represented by the variable name, or -1 if it does not represent an input.
 String getPackage()
          Gets the package name.
 Environment.VariableInfo lookupBind(String name)
          Looks up a binded type of the given variable or field name.
 OJClass lookupClass(String name)
          Looks a class object up.
static FieldAccess makeFieldAccess(int ordinal, int field)
          Constructs a reference to the fieldth field of the ordinalth input.
static String makeName(int ordinal)
          Constructs the name for the ordinalth input.
static Variable makeReference(int ordinal)
           
 void record(String name, OJClass clazz)
          Records a class object.
 String toString()
           
 
Methods inherited from class openjava.mop.Environment
bindVariable, currentClassName, getClassEnvironmentParent, getGlobalEnvironment, getParent, isBind, 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

rel

Rel rel

var0

private static final Variable var0

var1

private static final Variable var1
Constructor Detail

RelEnvironment

public RelEnvironment(Environment parent,
                      Rel rel)
Method Detail

toString

public String toString()
Specified by:
toString in class Environment

getPackage

public String getPackage()
Description copied from class: Environment
Gets the package name.

Overrides:
getPackage in class Environment

lookupClass

public OJClass lookupClass(String name)
Description copied from class: Environment
Looks a class object up.

Overrides:
lookupClass in class Environment
Parameters:
name - the name of the fully-qualified name of the class looked for

getInputOrdinal

public static int getInputOrdinal(String name)
Returns the ordinal of the input represented by the variable name, or -1 if it does not represent an input.


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 Environment
Parameters:
name - the fully-qualified name of the class

makeName

public static String makeName(int ordinal)
Constructs the name for the ordinalth input. For example, makeName(0) returns "$input0".


makeReference

public static Variable makeReference(int ordinal)

makeFieldAccess

public static FieldAccess makeFieldAccess(int ordinal,
                                          int field)
Constructs a reference to the fieldth field of the ordinalth input.


record

public void record(String name,
                   OJClass clazz)
Description copied from class: Environment
Records a class object.

Specified by:
record in class Environment
Parameters:
name - the fully-qualified name of the class
clazz - the class object associated with that name

bindVariable

public void bindVariable(String name,
                         Environment.VariableInfo info)
Description copied from class: Environment
Binds the name of a variable to information about the variable, including its class.

Specified by:
bindVariable in class Environment

SourceForge.net_Logo