70 syms = Symtab.instance(context); |
70 syms = Symtab.instance(context); |
71 types = Types.instance(context); |
71 types = Types.instance(context); |
72 } |
72 } |
73 |
73 |
74 public Element asElement(TypeMirror t) { |
74 public Element asElement(TypeMirror t) { |
75 Type type = cast(Type.class, t); |
75 switch (t.getKind()) { |
76 switch (type.tag) { |
76 case DECLARED: |
77 case TypeTags.CLASS: |
77 case ERROR: |
78 case TypeTags.ERROR: |
78 case TYPEVAR: |
79 case TypeTags.TYPEVAR: |
79 Type type = cast(Type.class, t); |
80 return type.asElement(); |
80 return type.asElement(); |
81 default: |
81 default: |
82 return null; |
82 return null; |
83 } |
83 } |
84 } |
84 } |