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; } }
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; } }