src/share/classes/com/sun/tools/javac/model/JavacTypes.java

changeset 988
7ae6c0fd479b
parent 928
307b065ff2af
child 1436
f6f1fd261f57
equal deleted inserted replaced
987:c7841bbe1227 988:7ae6c0fd479b
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 }

mercurial