1 package polyglot.ext.jl.types; 2 3 import polyglot.types.*; 4 import polyglot.util.*; 5 6 12 public class PlaceHolder_c implements PlaceHolder 13 { 14 17 String name; 18 19 20 protected PlaceHolder_c() { } 21 22 23 public PlaceHolder_c(Type t) { 24 if (t.isClass()) { 25 name = t.typeSystem().getTransformedClassName(t.toClass()); 26 } 27 else { 28 throw new InternalCompilerError("Cannot serialize " + t + "."); 29 } 30 } 31 32 33 public TypeObject resolve(TypeSystem ts) { 34 try { 35 return ts.systemResolver().find(name); 36 } catch (SemanticException se) { 37 throw new InternalCompilerError(se); 38 } 39 } 40 41 public String translate(Resolver c) { 42 throw new InternalCompilerError("Cannot translate place holder type."); 43 } 44 45 public String toString() { 46 return "PlaceHolder(" + name + ")"; 47 } 48 } 49 | Popular Tags |