|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectpolyglot.ext.jl.types.TypeSystem_c
polyglot.ext.param.types.ParamTypeSystem_c
public abstract class ParamTypeSystem_c
Implementation of type system for parameterized types.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class polyglot.ext.jl.types.TypeSystem_c |
|---|
TypeSystem_c.MostSpecificComparator |
| Field Summary |
|---|
| Fields inherited from class polyglot.ext.jl.types.TypeSystem_c |
|---|
ACCESS_FLAGS, BOOLEAN_, BYTE_, CHAR_, CLASS_, CONSTRUCTOR_FLAGS, defaultClassInit, DOUBLE_, FIELD_FLAGS, flagsForName, FLOAT_, INITIALIZER_FLAGS, INT_, loadedResolver, LOCAL_CLASS_FLAGS, LOCAL_FLAGS, LONG_, MEMBER_CLASS_FLAGS, METHOD_FLAGS, NULL_, OBJECT_, parsedResolver, SHORT_, STRING_, systemResolver, THROWABLE_, TOP_LEVEL_CLASS_FLAGS, unknownPackage, unknownQualifier, unknownType, VOID_ |
| Constructor Summary | |
|---|---|
ParamTypeSystem_c()
|
|
| Method Summary | |
|---|---|
protected void |
checkInstantiation(Position pos,
PClass base,
java.util.List actuals)
Check that an instantiation of a parametric type on a list of actual parameters is legal. |
ClassType |
instantiate(Position pos,
PClass base,
java.util.List actuals)
Instantiate a parametric type on a list of actual parameters. |
MuPClass |
mutablePClass(Position pos)
Create a new mutable PClass. |
Subst |
subst(java.util.Map substMap,
java.util.Map cache)
Create a substitutor. |
Type |
subst(Type t,
java.util.Map substMap)
Apply a parameter substitution to a type. |
Type |
subst(Type t,
java.util.Map substMap,
java.util.Map cache)
Apply a parameter substitution to a type. |
protected ClassType |
uncheckedInstantiate(Position pos,
PClass base,
java.util.List actuals)
Instantiate a parametric type on a list of actual parameters, but do not check that the instantiation is legal. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ParamTypeSystem_c()
| Method Detail |
|---|
public MuPClass mutablePClass(Position pos)
mutablePClass in interface ParamTypeSystempos - The position of the PClass.
public ClassType instantiate(Position pos,
PClass base,
java.util.List actuals)
throws SemanticException
instantiate in interface ParamTypeSystempos - The position of the instantiated typebase - The parameterized typeactuals - The list of actuals
SemanticException - when the actuals do not agree with the formals
protected void checkInstantiation(Position pos,
PClass base,
java.util.List actuals)
throws SemanticException
pos - The position of the instantiated typebase - The parameterized typeactuals - The list of actuals
SemanticException - when the actuals do not agree with the formals
protected ClassType uncheckedInstantiate(Position pos,
PClass base,
java.util.List actuals)
pos - The position of the instantiated typebase - The parameterized typeactuals - The list of actuals
public Type subst(Type t,
java.util.Map substMap)
subst in interface ParamTypeSystemt - The type on which we perform substitutions.substMap - Map from formal parameters to actuals; the formals are
not necessarily formals of t.
public Type subst(Type t,
java.util.Map substMap,
java.util.Map cache)
subst in interface ParamTypeSystemt - The type on which we perform substitutions.substMap - Map from formal parameters to actuals; the formals are
not necessarily formals of t.cache - Cache of substitutions performed, implemented as a map from
type to substituted type. This is passed in to ensure pointers to
outer classes are substituted correctly.
public Subst subst(java.util.Map substMap,
java.util.Map cache)
subst in interface ParamTypeSystemsubstMap - Map from formal parameters to actuals; the formals are
not necessarily formals of t.cache - Cache of substitutions performed, implemented as a map from
type to substituted type. This is passed in to ensure pointers to
outer classes are substituted correctly.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||