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
-
Constructor Summary
-
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.int
hashCode()
boolean
Subclassed by VariableElementImpl, TypeElementImpl, and ExecutableElementImpl.toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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:
getAnnotation
in interfaceAnnotatedConstruct
- Specified by:
getAnnotation
in interfaceElement
-
getAnnotationMirrors
- Specified by:
getAnnotationMirrors
in interfaceAnnotatedConstruct
- Specified by:
getAnnotationMirrors
in interfaceElement
-
getAnnotationsByType
- Specified by:
getAnnotationsByType
in interfaceAnnotatedConstruct
- Specified by:
getAnnotationsByType
in interfaceElement
-
getModifiers
- Specified by:
getModifiers
in interfaceElement
-
getSimpleName
- Specified by:
getSimpleName
in interfaceElement
-
hashCode
public int hashCode() -
equals
-
toString
-
getFileName
Description copied from interface:IElementInfo
Get 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:
getFileName
in 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)
-