openjava.mop
Class GlobalEnvironment

java.lang.Object
  |
  +--openjava.mop.Environment
        |
        +--openjava.mop.GlobalEnvironment

public class GlobalEnvironment
extends Environment


Nested Class Summary
 
Nested classes inherited from class openjava.mop.Environment
Environment.BasicVariableInfo, Environment.VariableInfo
 
Field Summary
private  Hashtable table
           
 
Fields inherited from class openjava.mop.Environment
parent
 
Constructor Summary
GlobalEnvironment()
           
 
Method Summary
 void bindVariable(String name, Environment.VariableInfo info)
          binds a name to the class type.
 String getPackageName()
          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.
 void record(String name, OJClass clazz)
          Records a class object.
 String toQualifiedName(String name)
          Obtains the fully-qualified name of the given class name.
 String toString()
           
 
Methods inherited from class openjava.mop.Environment
bindVariable, currentClassName, getClassEnvironmentParent, getGlobalEnvironment, getPackage, getParent, isBind, isQualifiedName, isRegisteredModifier, lookupClass, recordMemberClass, toPackageName, toSimpleName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

table

private Hashtable table
Constructor Detail

GlobalEnvironment

public GlobalEnvironment()
Method Detail

toString

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

getPackageName

public String getPackageName()
Gets the package name.


lookupClass

public OJClass lookupClass(String name)
Looks a class object up.

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

record

public void record(String name,
                   OJClass clazz)
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

toQualifiedName

public String toQualifiedName(String name)
Obtains the fully-qualified name of the given class name.

Overrides:
toQualifiedName in class Environment
Parameters:
name - a simple class name or a fully-qualified class name
Returns:
the fully-qualified name of the class

bindVariable

public void bindVariable(String name,
                         Environment.VariableInfo info)
binds a name to the class type.

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

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

SourceForge.net_Logo