예제 #1
0
 public Element asElement(TypeMirror t) {
   switch (t.getKind()) {
     case DECLARED:
     case ERROR:
     case TYPEVAR:
       Type type = cast(Type.class, t);
       return type.asElement();
     default:
       return null;
   }
 }
예제 #2
0
 public Element asElement(TypeMirror t) {
   Type type = cast(Type.class, t);
   switch (type.tag) {
     case TypeTags.CLASS:
     case TypeTags.ERROR:
     case TypeTags.TYPEVAR:
       return type.asElement();
     default:
       return null;
   }
 }