|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.dynamicjava.interpreter.DelegatingContext
edu.rice.cs.dynamicjava.interpreter.LocalContext
public class LocalContext
The context following a local class, variable, or function definition.
| Constructor Summary | |
|---|---|
LocalContext(TypeContext next,
ClassLoader loader,
DJClass c)
|
|
LocalContext(TypeContext next,
ClassLoader loader,
Iterable<DJClass> classes,
Iterable<LocalVariable> vars,
Iterable<LocalFunction> functions)
|
|
LocalContext(TypeContext next,
Iterable<LocalVariable> vars)
|
|
LocalContext(TypeContext next,
LocalFunction f)
|
|
LocalContext(TypeContext next,
LocalVariable var)
|
|
| Method Summary | |
|---|---|
protected LocalContext |
duplicate(TypeContext next)
Create a copy of this context with the given context enclosing it. |
boolean |
fieldExists(String name,
TypeSystem ts)
Test whether name is an in-scope field |
boolean |
functionExists(String name,
TypeSystem ts)
Test whether name is an in-scope method or local function |
ClassLoader |
getClassLoader()
Return the class loader for the current scope. |
Iterable<LocalFunction> |
getLocalFunctions(String name,
TypeSystem ts,
Iterable<LocalFunction> partial)
Helper for getLocalFunctions: list all matching functions, including those provided. |
LocalVariable |
getLocalVariable(String name,
TypeSystem ts)
Return the variable object for the given name, or null if it does not exist. |
DJClass |
getTopLevelClass(String name,
TypeSystem ts)
Return the top-level class with the given name, or null if it does not exist. |
VariableType |
getTypeVariable(String name,
TypeSystem ts)
Return the type variable with the given name, or null if it does not exist. |
boolean |
localFunctionExists(String name,
TypeSystem ts)
Test whether name is an in-scope local function |
boolean |
localVariableExists(String name,
TypeSystem ts)
Test whether name is an in-scope local variable |
boolean |
memberClassExists(String name,
TypeSystem ts)
Test whether name is an in-scope member class |
boolean |
methodExists(String name,
TypeSystem ts)
Test whether name is an in-scope method |
boolean |
topLevelClassExists(String name,
TypeSystem ts)
Test whether name is an in-scope top-level class |
ClassType |
typeContainingField(String name,
TypeSystem ts)
Return the most inner type containing a field with the given name, or null
if there is no such type. |
ClassType |
typeContainingMemberClass(String name,
TypeSystem ts)
Return the most inner type containing a class with the given name, or null
if there is no such type. |
Type |
typeContainingMethod(String name,
TypeSystem ts)
Return the most inner type containing a method with the given name, or null
if there is no such type. |
boolean |
typeExists(String name,
TypeSystem ts)
Test whether name is an in-scope top-level class, member class, or type variable |
boolean |
typeVariableExists(String name,
TypeSystem ts)
Test whether name is an in-scope type variable. |
boolean |
variableExists(String name,
TypeSystem ts)
Test whether name is an in-scope field or local variable |
| Methods inherited from class edu.rice.cs.dynamicjava.interpreter.DelegatingContext |
|---|
accessModule, getDeclaredThrownTypes, getLocalFunctions, getReturnType, getThis, getThis, getThis, importField, importMemberClass, importMemberClasses, importMethod, importStaticMembers, importTopLevelClass, importTopLevelClasses, initializingClass, makeAnonymousClassName, makeClassName, setPackage |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LocalContext(TypeContext next,
ClassLoader loader,
Iterable<DJClass> classes,
Iterable<LocalVariable> vars,
Iterable<LocalFunction> functions)
public LocalContext(TypeContext next,
Iterable<LocalVariable> vars)
public LocalContext(TypeContext next,
LocalVariable var)
public LocalContext(TypeContext next,
ClassLoader loader,
DJClass c)
public LocalContext(TypeContext next,
LocalFunction f)
| Method Detail |
|---|
protected LocalContext duplicate(TypeContext next)
DelegatingContext
duplicate in class DelegatingContext
public boolean typeExists(String name,
TypeSystem ts)
DelegatingContextname is an in-scope top-level class, member class, or type variable
typeExists in interface TypeContexttypeExists in class DelegatingContext
public boolean topLevelClassExists(String name,
TypeSystem ts)
DelegatingContextname is an in-scope top-level class
topLevelClassExists in interface TypeContexttopLevelClassExists in class DelegatingContext
public DJClass getTopLevelClass(String name,
TypeSystem ts)
throws AmbiguousNameException
DelegatingContextnull if it does not exist.
getTopLevelClass in interface TypeContextgetTopLevelClass in class DelegatingContextAmbiguousNameException
public boolean memberClassExists(String name,
TypeSystem ts)
DelegatingContextname is an in-scope member class
memberClassExists in interface TypeContextmemberClassExists in class DelegatingContext
public ClassType typeContainingMemberClass(String name,
TypeSystem ts)
throws AmbiguousNameException
DelegatingContextnull
if there is no such type.
typeContainingMemberClass in interface TypeContexttypeContainingMemberClass in class DelegatingContextAmbiguousNameException
public boolean typeVariableExists(String name,
TypeSystem ts)
DelegatingContextname is an in-scope type variable.
typeVariableExists in interface TypeContexttypeVariableExists in class DelegatingContext
public VariableType getTypeVariable(String name,
TypeSystem ts)
DelegatingContextnull if it does not exist.
getTypeVariable in interface TypeContextgetTypeVariable in class DelegatingContext
public boolean variableExists(String name,
TypeSystem ts)
DelegatingContextname is an in-scope field or local variable
variableExists in interface TypeContextvariableExists in class DelegatingContext
public boolean localVariableExists(String name,
TypeSystem ts)
DelegatingContextname is an in-scope local variable
localVariableExists in interface TypeContextlocalVariableExists in class DelegatingContext
public LocalVariable getLocalVariable(String name,
TypeSystem ts)
DelegatingContextnull if it does not exist.
getLocalVariable in interface TypeContextgetLocalVariable in class DelegatingContext
public boolean fieldExists(String name,
TypeSystem ts)
DelegatingContextname is an in-scope field
fieldExists in interface TypeContextfieldExists in class DelegatingContext
public ClassType typeContainingField(String name,
TypeSystem ts)
throws AmbiguousNameException
DelegatingContextnull
if there is no such type.
typeContainingField in interface TypeContexttypeContainingField in class DelegatingContextAmbiguousNameException
public boolean functionExists(String name,
TypeSystem ts)
DelegatingContextname is an in-scope method or local function
functionExists in interface TypeContextfunctionExists in class DelegatingContext
public boolean localFunctionExists(String name,
TypeSystem ts)
DelegatingContextname is an in-scope local function
localFunctionExists in interface TypeContextlocalFunctionExists in class DelegatingContext
public Iterable<LocalFunction> getLocalFunctions(String name,
TypeSystem ts,
Iterable<LocalFunction> partial)
TypeContext
getLocalFunctions in interface TypeContextgetLocalFunctions in class DelegatingContext
public boolean methodExists(String name,
TypeSystem ts)
DelegatingContextname is an in-scope method
methodExists in interface TypeContextmethodExists in class DelegatingContext
public Type typeContainingMethod(String name,
TypeSystem ts)
DelegatingContextnull
if there is no such type.
typeContainingMethod in interface TypeContexttypeContainingMethod in class DelegatingContextpublic ClassLoader getClassLoader()
TypeContext
getClassLoader in interface TypeContextgetClassLoader in class DelegatingContext
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||