1 package polyglot.ext.param.types; 2 3 import polyglot.types.*; 4 import polyglot.util.Position; 5 import java.util.List; 6 7 /** 8 * Parameterized class. This class is a wrapper around 9 * a ClassType that associates formal parameters with the class. 10 * formals can be any type object. 11 */ 12 public interface PClass extends Importable { 13 /** 14 * The formal type parameters associated with <code>this</code>. 15 * A list of TypeObject. 16 */ 17 List formals(); 18 19 /** 20 * The class associated with <code>this</code>. Note that 21 * <code>this</code> should never be used as a first-class type. 22 */ 23 ClassType clazz(); 24 25 /** 26 * Instantiate <code>this</code>. 27 * @param pos The position of the instantiation 28 * @param actuals The actual type parameters for the instantiation 29 */ 30 ClassType instantiate(Position pos, List actuals) throws SemanticException; 31 } 32