|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Type system for parameterized types.
| Method Summary | |
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 base,
java.util.Map substMap)
Apply a parameter substitution to a type. |
Type |
subst(Type base,
java.util.Map substMap,
java.util.Map cache)
Apply a parameter substitution to a type. |
| Method Detail |
public MuPClass mutablePClass(Position pos)
pos - The position of the pclass
public ClassType instantiate(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
public Type subst(Type base,
java.util.Map substMap)
base - The type on which we perform substitutions.substMap - Map from formal parameters to actuals; the formals are
not necessarily formals of base.
public Type subst(Type base,
java.util.Map substMap,
java.util.Map cache)
base - The type on which we perform substitutions.substMap - Map from formal parameters to actuals; the formals are
not necessarily formals of base.cache - Cache of substitutions performed, implemented as a map from
base 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)
substMap - Map from formal parameters to actuals; the formals are
not necessarily formals of base.cache - Cache of substitutions performed, implemented as a map from
base 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 | |||||||||