|
||||||||||
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. |
ClassType |
nullInstantiate(PClass base)
Null instantiate base , using the same Position
as base . |
ClassType |
nullInstantiate(Position pos,
PClass base)
Instantiate a parametric type on its own formals. |
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 pclasspublic ClassType nullInstantiate(Position pos, PClass base)
pos
- The position of the instantiated typebase
- The parameterized typepublic ClassType nullInstantiate(PClass base)
base
, using the same Position
as base
.
base
- The parameterized typepublic 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 formalspublic 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 |