Class ElementImpl
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.compiler.apt.model.ElementImpl
- All Implemented Interfaces:
AnnotatedConstruct,Element,IElementInfo
- Direct Known Subclasses:
ExecutableElementImpl,ModuleElementImpl,PackageElementImpl,TypeElementImpl,TypeParameterElementImpl,VariableElementImpl
Element represents any defined Java language element - a package,
a method, a class or interface. Contrast with DeclaredType.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasType()boolean<A extends Annotation>
AgetAnnotation(Class<A> annotationClass)protected abstract AnnotationBinding[]List<? extends AnnotationMirror><A extends Annotation>
A[]getAnnotationsByType(Class<A> annotationType)Get the project-relative path to the source file that contains this element.inthashCode()booleanSubclassed by VariableElementImpl, TypeElementImpl, and ExecutableElementImpl.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface javax.lang.model.element.Element
accept, getEnclosedElements, getEnclosingElement, getKind
-
Field Details
-
_env
-
_binding
-
-
Constructor Details
-
ElementImpl
-
-
Method Details
-
asType
-
getAnnotationBindings
- Returns:
- the set of compiler annotation bindings on this element
-
getPackedAnnotationBindings
-
getAnnotation
- Specified by:
getAnnotationin interfaceAnnotatedConstruct- Specified by:
getAnnotationin interfaceElement
-
getAnnotationMirrors
- Specified by:
getAnnotationMirrorsin interfaceAnnotatedConstruct- Specified by:
getAnnotationMirrorsin interfaceElement
-
getAnnotationsByType
- Specified by:
getAnnotationsByTypein interfaceAnnotatedConstruct- Specified by:
getAnnotationsByTypein interfaceElement
-
getModifiers
- Specified by:
getModifiersin interfaceElement
-
getSimpleName
- Specified by:
getSimpleNamein interfaceElement
-
hashCode
public int hashCode() -
equals
-
toString
-
getFileName
Description copied from interface:IElementInfoGet the project-relative path to the source file that contains this element. If the element is a PackageElement, the "source file" is package-info.java. If the element is not recognized or does not exist in the project for some reason, returns null.- Specified by:
getFileNamein interfaceIElementInfo- Returns:
- the project-relative path, or null.
-
hides
Subclassed by VariableElementImpl, TypeElementImpl, and ExecutableElementImpl. This base implementation suffices for other types.- Returns:
- true if this element hides
hidden - See Also:
Elements.hides(javax.lang.model.element.Element, javax.lang.model.element.Element)
-