1 package polyglot.ext.param.types; 2 3 import polyglot.types.*; 4 import polyglot.types.Package; 5 import polyglot.util.*; 6 7 import polyglot.ext.jl.types.*; 8 9 import java.util.*; 10 11 17 public abstract class PClass_c extends TypeObject_c implements PClass { 18 protected PClass_c() { } 19 20 public PClass_c(TypeSystem ts) { 21 this(ts, null); 22 } 23 24 public PClass_c(TypeSystem ts, Position pos) { 25 super(ts, pos); 26 } 27 28 31 public ClassType instantiate(Position pos, List actuals) 32 throws SemanticException 33 { 34 ParamTypeSystem pts = (ParamTypeSystem) typeSystem(); 35 return pts.instantiate(pos, this, actuals); 36 } 37 38 39 42 public boolean isCanonical() { 43 if (!clazz().isCanonical()) { 44 return false; 45 } 46 47 for (Iterator i = formals().iterator(); i.hasNext(); ) { 48 Param p = (Param) i.next(); 49 if (!p.isCanonical()) { 50 return false; 51 } 52 } 53 54 return true; 55 } 56 57 58 61 public String name() { 62 return clazz().name(); 63 } 64 65 public String fullName() { 66 return clazz().fullName(); 67 } 68 69 70 73 public Package package_() { 74 return clazz().package_(); 75 } 76 77 } 78 | Popular Tags |