How can I get package name
, generic type
and Parametrized type
from a type
from a field element
in Annotation processor?
Say, if Element.asType
returns java.util.List<String>
, I want to get
- Package name
java.util
- Generic type
List<E>
or raw typeList
(preferably raw type) - Actual Type
String
Is there any method in element utils
, type utils
?
DeclaredType
withinstanceof
andelement.asType().getKind() == TypeKind.DECLARED)
? – Gamine