edu.rice.cs.dynamicjava.interpreter
Class FunctionSignatureContext

java.lang.Object
  extended by edu.rice.cs.dynamicjava.interpreter.DelegatingContext
      extended by edu.rice.cs.dynamicjava.interpreter.FunctionSignatureContext
All Implemented Interfaces:
TypeContext

public class FunctionSignatureContext
extends DelegatingContext

The context of a class declaration's signature, which includes its type variables and own name.


Constructor Summary
FunctionSignatureContext(TypeContext next, Function f)
           
 
Method Summary
protected  FunctionSignatureContext duplicate(TypeContext next)
          Create a copy of this context with the given context enclosing it.
 DJClass getTopLevelClass(java.lang.String name, TypeSystem ts)
          Return the top-level class with the given name, or null if it does not exist.
 VariableType getTypeVariable(java.lang.String name, TypeSystem ts)
          Return the type variable with the given name, or null if it does not exist.
 boolean memberClassExists(java.lang.String name, TypeSystem ts)
          Test whether name is an in-scope member class
 boolean topLevelClassExists(java.lang.String name, TypeSystem ts)
          Test whether name is an in-scope top-level class
 ClassType typeContainingMemberClass(java.lang.String name, TypeSystem ts)
          Return the most inner type containing a class with the given name, or null if there is no such type.
 boolean typeExists(java.lang.String name, TypeSystem ts)
          Test whether name is an in-scope top-level class, member class, or type variable
 boolean typeVariableExists(java.lang.String name, TypeSystem ts)
          Test whether name is an in-scope type variable.
 
Methods inherited from class edu.rice.cs.dynamicjava.interpreter.DelegatingContext
accessModule, fieldExists, functionExists, getClassLoader, getDeclaredThrownTypes, getLocalFunctions, getLocalFunctions, getLocalVariable, getReturnType, getThis, getThis, getThis, importField, importMemberClass, importMemberClasses, importMethod, importStaticMembers, importTopLevelClass, importTopLevelClasses, initializingClass, localFunctionExists, localVariableExists, makeAnonymousClassName, makeClassName, methodExists, setPackage, typeContainingField, typeContainingMethod, variableExists
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FunctionSignatureContext

public FunctionSignatureContext(TypeContext next,
                                Function f)
Method Detail

duplicate

protected FunctionSignatureContext duplicate(TypeContext next)
Description copied from class: DelegatingContext
Create a copy of this context with the given context enclosing it.

Specified by:
duplicate in class DelegatingContext

typeExists

public boolean typeExists(java.lang.String name,
                          TypeSystem ts)
Description copied from class: DelegatingContext
Test whether name is an in-scope top-level class, member class, or type variable

Specified by:
typeExists in interface TypeContext
Overrides:
typeExists in class DelegatingContext

typeVariableExists

public boolean typeVariableExists(java.lang.String name,
                                  TypeSystem ts)
Description copied from class: DelegatingContext
Test whether name is an in-scope type variable.

Specified by:
typeVariableExists in interface TypeContext
Overrides:
typeVariableExists in class DelegatingContext

getTypeVariable

public VariableType getTypeVariable(java.lang.String name,
                                    TypeSystem ts)
Description copied from class: DelegatingContext
Return the type variable with the given name, or null if it does not exist.

Specified by:
getTypeVariable in interface TypeContext
Overrides:
getTypeVariable in class DelegatingContext

topLevelClassExists

public boolean topLevelClassExists(java.lang.String name,
                                   TypeSystem ts)
Description copied from class: DelegatingContext
Test whether name is an in-scope top-level class

Specified by:
topLevelClassExists in interface TypeContext
Overrides:
topLevelClassExists in class DelegatingContext

getTopLevelClass

public DJClass getTopLevelClass(java.lang.String name,
                                TypeSystem ts)
                         throws AmbiguousNameException
Description copied from class: DelegatingContext
Return the top-level class with the given name, or null if it does not exist.

Specified by:
getTopLevelClass in interface TypeContext
Overrides:
getTopLevelClass in class DelegatingContext
Throws:
AmbiguousNameException

memberClassExists

public boolean memberClassExists(java.lang.String name,
                                 TypeSystem ts)
Description copied from class: DelegatingContext
Test whether name is an in-scope member class

Specified by:
memberClassExists in interface TypeContext
Overrides:
memberClassExists in class DelegatingContext

typeContainingMemberClass

public ClassType typeContainingMemberClass(java.lang.String name,
                                           TypeSystem ts)
                                    throws AmbiguousNameException
Description copied from class: DelegatingContext
Return the most inner type containing a class with the given name, or null if there is no such type.

Specified by:
typeContainingMemberClass in interface TypeContext
Overrides:
typeContainingMemberClass in class DelegatingContext
Throws:
AmbiguousNameException