polyglot.ext.param.types
Interface PClass

All Superinterfaces:
java.lang.Cloneable, Copy, Importable, Named, java.io.Serializable, TypeObject
All Known Subinterfaces:
MuPClass
All Known Implementing Classes:
MuPClass_c, PClass_c

public interface PClass
extends Importable

Parametric class. This class is a wrapper around a ClassType that associates formal parameters with the class. formals can be any type object.


Method Summary
 ClassType clazz()
          The class associated with this.
 java.util.List formals()
          The formal type parameters associated with this.
 ClassType instantiate(Position pos, java.util.List actuals)
          Instantiate this.
 ClassType nullInstantiate()
          Null instantiate this at the position of clazz().
 ClassType nullInstantiate(Position pos)
          Null instantiate this.
 
Methods inherited from interface polyglot.types.Importable
package_
 
Methods inherited from interface polyglot.types.Named
fullName, name
 
Methods inherited from interface polyglot.types.TypeObject
equalsImpl, isCanonical, position, typeSystem
 
Methods inherited from interface polyglot.util.Copy
copy
 

Method Detail

formals

public java.util.List formals()
The formal type parameters associated with this.


clazz

public ClassType clazz()
The class associated with this. Note that this should never be used as a first-class type.


instantiate

public ClassType instantiate(Position pos,
                             java.util.List actuals)
                      throws SemanticException
Instantiate this.

Parameters:
pos - The position of the instantiation
actuals - The actual type parameters for the instantiation
Throws:
SemanticException

nullInstantiate

public ClassType nullInstantiate()
Null instantiate this at the position of clazz().


nullInstantiate

public ClassType nullInstantiate(Position pos)
Null instantiate this. A null instantiation is an instantiation where the actuals are identical to the formals.

Parameters:
pos - The position of the instantiation