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:
-
Nested Class Summary
Nested classes/interfaces inherited from interface javax.lang.model.util.Elements
Elements.DocCommentKind, Elements.Origin -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final BaseProcessingEnvImplprotected static final Pattern -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ElementsImplprotected static StringformatJavadoc(char[] unparsed) Strip the comment characters from a javadoc comment.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) Map<? extends ExecutableElement, ? extends AnnotationValue> getName(CharSequence cs) getPackageOf(Element type) getTypeElement(CharSequence name) protected char[]Return the entire javadoc comment on e, including the comment characters and whitespacebooleanbooleanisAutomaticModule(ModuleElement module) booleanbooleanbooleanoverrides(ExecutableElement overrider, ExecutableElement overridden, TypeElement type) voidprintElements(Writer w, Element... elements) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.lang.model.util.Elements
getAllModuleElements, getAllPackageElements, getAllTypeElements, getDocCommentKind, getEnumConstantBody, getFileObjectOf, getModuleElement, getModuleOf, getOrigin, getOrigin, getOrigin, getOutermostTypeElement, getPackageElement, getTypeElement, isBridge, isCanonicalConstructor, isCompactConstructor, recordComponentFor
-
Field Details
-
INITIAL_DELIMITER
-
_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:
getAllAnnotationMirrorsin 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:
getAllMembersin interfaceElements
-
getBinaryName
- Specified by:
getBinaryNamein interfaceElements
-
getConstantExpression
- Specified by:
getConstantExpressionin interfaceElements
-
getDocComment
- Specified by:
getDocCommentin interfaceElements
-
getUnparsedDocComment
Return the entire javadoc comment on e, including the comment characters and whitespace- Parameters:
e- an Element of any sort, possibly with a javadoc comment.- Returns:
- a String, or null if the comment is not available
-
formatJavadoc
Strip the comment characters from a javadoc comment. Assume the comment is already missing its closing delimiter. Javac's behavior with regard to tab expansion and trimming of whitespace and asterisks is bizarre and undocumented. We do our best here to emulate it. -
getElementValuesWithDefaults
public Map<? extends ExecutableElement,? extends AnnotationValue> getElementValuesWithDefaults(AnnotationMirror a) - Specified by:
getElementValuesWithDefaultsin 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:
-
getName
-
getPackageElement
- Specified by:
getPackageElementin interfaceElements
-
getPackageOf
- Specified by:
getPackageOfin interfaceElements
-
getTypeElement
- Specified by:
getTypeElementin interfaceElements
-
hides
-
isDeprecated
- Specified by:
isDeprecatedin interfaceElements
-
overrides
public boolean overrides(ExecutableElement overrider, ExecutableElement overridden, TypeElement type) -
printElements
- Specified by:
printElementsin interfaceElements
-
isFunctionalInterface
- Specified by:
isFunctionalInterfacein interfaceElements
-
isAutomaticModule
- Specified by:
isAutomaticModulein interfaceElements
-