Class ElementsImpl
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.compiler.apt.model.ElementsImpl
- All Implemented Interfaces:
Elements
- Direct Known Subclasses:
ElementsImpl9
Utilities for working with java8 and earlier language elements.
There is one of these for every ProcessingEnvironment.
- See Also:
ElementsImpl9
-
Nested Class Summary
Nested classes/interfaces inherited from interface javax.lang.model.util.Elements
Elements.Origin
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ElementsImpl
create(BaseProcessingEnvImpl env)
List<? extends AnnotationMirror>
Return all the annotation mirrors on this element, including inherited annotations.getAllMembers(TypeElement type)
Compute a list of all the visible entities in this type.getBinaryName(TypeElement type)
getConstantExpression(Object value)
getDocComment(Element e)
Map<? extends ExecutableElement,? extends AnnotationValue>
getName(CharSequence cs)
getPackageElement(CharSequence name)
getPackageOf(Element type)
getTypeElement(CharSequence name)
boolean
boolean
isDeprecated(Element e)
boolean
isFunctionalInterface(TypeElement type)
boolean
overrides(ExecutableElement overrider, ExecutableElement overridden, TypeElement type)
void
printElements(Writer w, Element... elements)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.lang.model.util.Elements
getAllModuleElements, getAllPackageElements, getAllTypeElements, getModuleElement, getModuleOf, getOrigin, getOrigin, getOrigin, getPackageElement, getTypeElement, isBridge, recordComponentFor
-
Field Details
-
_env
-
-
Constructor Details
-
ElementsImpl
-
-
Method Details
-
create
-
getAllAnnotationMirrors
Return all the annotation mirrors on this element, including inherited annotations. Annotations are inherited only if the annotation type is meta-annotated with @Inherited, and the annotation is on a class: e.g., annotations are not inherited for interfaces, methods, or fields.- Specified by:
getAllAnnotationMirrors
in interfaceElements
-
getAllMembers
Compute a list of all the visible entities in this type. Specifically:- All nested types declared in this type, including interfaces and enums
- All protected or public nested types declared in this type's superclasses and superinterfaces, that are not hidden by a name collision
- All methods declared in this type, including constructors but not including static or instance initializers, and including abstract methods and unimplemented methods declared in interfaces
- All protected or public methods declared in this type's superclasses, that are not overridden by another method, but not including constructors or initializers. Includes abstract methods and methods declared in superinterfaces but not implemented
- All fields declared in this type, including constants
- All non-private fields declared in this type's superclasses and superinterfaces, that are not hidden by a name collision.
- Specified by:
getAllMembers
in interfaceElements
-
getBinaryName
- Specified by:
getBinaryName
in interfaceElements
-
getConstantExpression
- Specified by:
getConstantExpression
in interfaceElements
-
getDocComment
- Specified by:
getDocComment
in interfaceElements
-
getElementValuesWithDefaults
public Map<? extends ExecutableElement,? extends AnnotationValue> getElementValuesWithDefaults(AnnotationMirror a)- Specified by:
getElementValuesWithDefaults
in interfaceElements
- Returns:
- all the annotation instance's explicitly set values, plus default values
for all the annotation members that are not explicitly set but that have
defaults. By comparison,
AnnotationMirror.getElementValues()
only returns the explicitly set values. - See Also:
Elements.getElementValuesWithDefaults(javax.lang.model.element.AnnotationMirror)
-
getName
-
getPackageElement
- Specified by:
getPackageElement
in interfaceElements
-
getPackageOf
- Specified by:
getPackageOf
in interfaceElements
-
getTypeElement
- Specified by:
getTypeElement
in interfaceElements
-
hides
-
isDeprecated
- Specified by:
isDeprecated
in interfaceElements
-
overrides
public boolean overrides(ExecutableElement overrider, ExecutableElement overridden, TypeElement type) -
printElements
- Specified by:
printElements
in interfaceElements
-
isFunctionalInterface
- Specified by:
isFunctionalInterface
in interfaceElements
-