1 package polyglot.ext.coffer.types; 2 3 import polyglot.ext.jl.types.*; 4 import polyglot.types.*; 5 import polyglot.visit.*; 6 import polyglot.util.*; 7 8 public abstract class Key_c extends TypeObject_c implements Key 9 { 10 protected String name; 11 12 public Key_c(TypeSystem ts, Position pos, String name) { 13 super(ts, pos); 14 this.name = name; 15 } 16 17 public String name() { 18 return name; 19 } 20 21 public Key name(String name) { 22 Key_c n = (Key_c) copy(); 23 n.name = name; 24 return n; 25 } 26 27 public boolean equalsImpl(TypeObject o) { 28 return o == this; 29 } 30 31 public int hashCode() { 32 return name.hashCode(); 33 } 34 35 public String toString() { 36 return name; 37 } 39 40 public boolean isCanonical() { 41 return true; 42 } 43 } 44 | Popular Tags |