public class JL5Context_c extends Context_c implements JL5Context
Context_c.Kind
Modifier and Type | Field and Description |
---|---|
protected boolean |
ctorCall |
protected ClassType |
declaringClass |
static Context_c.Kind |
EXTENDS |
static Context_c.Kind |
SWITCH |
protected Type |
switchType |
static Context_c.Kind |
TYPE_VAR |
protected TypeVariable |
typeVariable |
protected java.util.Map<java.lang.String,TypeVariable> |
typeVars |
Constructor and Description |
---|
JL5Context_c(Lang lang,
TypeSystem ts) |
Modifier and Type | Method and Description |
---|---|
void |
addTypeVariable(TypeVariable type) |
ClassType |
extendsClauseDeclaringClass() |
ClassType |
findFieldScope(java.lang.String name)
Finds the class which added a field to the scope.
|
MethodInstance |
findMethod(java.lang.String name,
java.util.List<? extends Type> argTypes)
Looks up a method with name "name" and arguments compatible with
"argTypes".
|
TypeVariable |
findTypeVariableInThisScope(java.lang.String name) |
VarInstance |
findVariableInStaticImport(java.lang.String name) |
VarInstance |
findVariableSilent(java.lang.String name)
Gets a local or field of a particular name.
|
boolean |
inCTORCall() |
boolean |
inExtendsClause() |
boolean |
inTypeVariable() |
protected Context_c |
push() |
Context |
pushCTORCall()
pushes an additional static scoping level.
|
Context |
pushExtendsClause(ClassType declaringClass) |
Context |
pushSwitch(Type type) |
JL5Context |
pushTypeVariable(TypeVariable iType) |
Type |
switchType() |
java.lang.String |
toString() |
JL5TypeSystem |
typeSystem()
The type system.
|
addMethod, addNamed, addNamedToThisScope, addVariable, addVariableToThisScope, copy, currentClass, currentClassScope, currentCode, definingCodeDef, find, findField, findInThisScope, findLabelSilent, findLocal, findLocalSilent, findMethodContainerInThisScope, findMethodScope, findVariable, findVariableInThisScope, importTable, inCode, inStaticContext, isBlock, isClass, isCode, isLocal, isOuter, isSource, lang, mapsToString, outerResolver, package_, pop, pushBlock, pushClass, pushCode, pushLabel, pushSource, pushStatic
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
findVariableInThisScope
addMethod, addNamed, addVariable, currentClass, currentClassScope, currentCode, definingCodeDef, findField, findLabelSilent, findLocal, findLocalSilent, findMethodScope, findVariable, importTable, inCode, inStaticContext, isLocal, lang, outerResolver, package_, pop, pushBlock, pushClass, pushCode, pushLabel, pushSource, pushStatic
protected java.util.Map<java.lang.String,TypeVariable> typeVars
protected TypeVariable typeVariable
protected Type switchType
protected ClassType declaringClass
protected boolean ctorCall
public static final Context_c.Kind TYPE_VAR
public static final Context_c.Kind SWITCH
public static final Context_c.Kind EXTENDS
public JL5Context_c(Lang lang, TypeSystem ts)
public JL5TypeSystem typeSystem()
Context
typeSystem
in interface JL5Context
typeSystem
in interface Context
typeSystem
in class Context_c
public ClassType findFieldScope(java.lang.String name) throws SemanticException
Context_c
findFieldScope
in interface Context
findFieldScope
in class Context_c
SemanticException
public VarInstance findVariableSilent(java.lang.String name)
Context_c
findVariableSilent
in interface JL5Context
findVariableSilent
in interface Context
findVariableSilent
in class Context_c
public VarInstance findVariableInStaticImport(java.lang.String name)
public Context pushCTORCall()
pushCTORCall
in interface JL5Context
public JL5Context pushTypeVariable(TypeVariable iType)
pushTypeVariable
in interface JL5Context
public TypeVariable findTypeVariableInThisScope(java.lang.String name)
findTypeVariableInThisScope
in interface JL5Context
public boolean inTypeVariable()
inTypeVariable
in interface JL5Context
public boolean inCTORCall()
inCTORCall
in interface JL5Context
public void addTypeVariable(TypeVariable type)
addTypeVariable
in interface JL5Context
public Context pushSwitch(Type type)
pushSwitch
in interface JL5Context
public Context pushExtendsClause(ClassType declaringClass)
pushExtendsClause
in interface JL5Context
public Type switchType()
switchType
in interface JL5Context
public MethodInstance findMethod(java.lang.String name, java.util.List<? extends Type> argTypes) throws SemanticException
Context_c
findMethod
in interface Context
findMethod
in class Context_c
argTypes
- A list of Type
.SemanticException
Type
public boolean inExtendsClause()
inExtendsClause
in interface JL5Context
public ClassType extendsClauseDeclaringClass()
extendsClauseDeclaringClass
in interface JL5Context