javax.lang.model.element


1. Get the enclosing element of an element

Element enclosingElement = element.getEnclosingElement();

2. Get the annotations of an element

List<? extends AnnotationMirror> annotations = element.getAnnotationMirrors();

3. Get the modifiers of an element

Set<Modifier> modifiers = element.getModifiers();

4. Get the simple name of an element

String simpleName = element.getSimpleName().toString();

5. Get the qualified name of an element

String qualifiedName = element.getQualifiedName().toString();

6. Get the kind of an element

ElementKind kind = element.getKind();

7. Get the type of an element

TypeMirror type = element.asType();

8. Get the value of an annotation

Object value = element.getAnnotation(AnnotationName.class).getValue();

9. Get the default value of an annotation

Object defaultValue = element.getAnnotationDefault().getValue();

10. Get the documentation for an element

11. Get the position of an element

12. Get the enclosing class of an element

13. Get the enclosing method of an element

14. Get the enclosing constructor of an element

15. Get the enclosing package of an element

16. Get the enclosing module of an element

17. Get the enclosing type of an element

18. Get the enclosing annotation of an element

19. Get the enclosing enum of an element

20. Get the enclosing record of an element

21. Get the enclosing record component of an element

22. Get the enclosing variable of an element

23. Get the enclosing parameter of an element

24. Get the enclosing type parameter of an element

25. Get the enclosing method parameter of an element

26. Get the enclosing constructor parameter of an element

27. Get the enclosing type use of an element

28. Get the enclosing method use of an element

29. Get the enclosing constructor use of an element

30. Get the enclosing field use of an element

31. Get the enclosing local variable use of an element

32. Get the enclosing annotation value of an element

33. Get the enclosing enum value of an element

34. Get the enclosing record component value of an element

35. Get the enclosing package of an element

36. Get the enclosing module of an element

37. Get the enclosing type of an element

38. Get the enclosing annotation of an element

39. Get the enclosing enum of an element

40. Get the enclosing record of an element

41. Get the enclosing record component of an element

42. Get the enclosing variable of an element

43. Get the enclosing parameter of an element

44. Get the enclosing type parameter of an element

45. Get the enclosing method parameter of an element

46. Get the enclosing constructor parameter of an element

47. Get the enclosing type use of an element

48. Get the enclosing method use of an element

49. Get the enclosing constructor use of an element

50. Get the enclosing field use of an element