public TypeDeclaration asDecl(Class c) {
return env.getTypeDeclaration(getSourceClassName(c));
}
public <T> TypeMirror erasure(TypeMirror t) {
Types tu = env.getTypeUtils();
t = tu.getErasure(t);
if(t instanceof DeclaredType) {
DeclaredType dt = (DeclaredType)t;
if(!dt.getActualTypeArguments().isEmpty())
return tu.getDeclaredType(dt.getDeclaration());
}
return t;
}