public interface Elements
Utility methods for operating on program elements.
Compatibility Note: Methods may be added to this interface in future releases of the platform.
- Since:
- 1.6
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
The origin of an element or other language model item. -
Method Summary
Modifier and TypeMethodDescriptionList<? extends AnnotationMirror>
Returns all annotations present on an element, whether directly present or present via inheritance.getAllMembers
(TypeElement type) Returns all members of a type element, whether inherited or declared directly.default Set<? extends ModuleElement>
Returns all module elements in the current environment.default Set<? extends PackageElement>
Returns all package elements with the given canonical name.default Set<? extends TypeElement>
Returns all type elements with the given canonical name.getBinaryName
(TypeElement type) Returns the binary name of a type element.getConstantExpression
(Object value) Returns the text of a constant expression representing a primitive value or a string.Returns the text of the documentation ("Javadoc") comment of an element.Map<? extends ExecutableElement,
? extends AnnotationValue> Returns the values of an annotation's elements, including defaults.default JavaFileObject
Returns the file object for this element ornull
if there is no such file object.default ModuleElement
getModuleElement
(CharSequence name) Returns a module element given its fully qualified name.default ModuleElement
Returns the module of an element.getName
(CharSequence cs) Returns a name with the same sequence of characters as the argument.default Elements.Origin