org.aspectj.org.eclipse.jdt.internal.compiler.apt.model
Class ElementImpl
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.compiler.apt.model.ElementImpl
- All Implemented Interfaces:
- javax.lang.model.element.Element, IElementInfo
- Direct Known Subclasses:
- ExecutableElementImpl, PackageElementImpl, TypeElementImpl, TypeParameterElementImpl, VariableElementImpl
public abstract class ElementImpl
- extends java.lang.Object
- implements javax.lang.model.element.Element, IElementInfo
Element represents any defined Java language element - a package,
a method, a class or interface. Contrast with DeclaredType.
| 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 |
_env
public final BaseProcessingEnvImpl _env
_binding
public final Binding _binding
ElementImpl
protected ElementImpl(BaseProcessingEnvImpl env,
Binding binding)
asType
public javax.lang.model.type.TypeMirror asType()
- Specified by:
asType in interface javax.lang.model.element.Element
getAnnotationBindings
protected abstract AnnotationBinding[] getAnnotationBindings()
- Returns:
- the set of compiler annotation bindings on this element
getPackedAnnotationBindings
public final AnnotationBinding[] getPackedAnnotationBindings()
getAnnotation
public <A extends java.lang.annotation.Annotation> A getAnnotation(java.lang.Class<A> annotationClass)
- Specified by:
getAnnotation in interface javax.lang.model.element.Element
getAnnotationMirrors
public java.util.List<? extends javax.lang.model.element.AnnotationMirror> getAnnotationMirrors()
- Specified by:
getAnnotationMirrors in interface javax.lang.model.element.Element
getAnnotationsByType
public <A extends java.lang.annotation.Annotation> A[] getAnnotationsByType(java.lang.Class<A> annotationType)
getModifiers
public java.util.Set<javax.lang.model.element.Modifier> getModifiers()
- Specified by:
getModifiers in interface javax.lang.model.element.Element
getSimpleName
public javax.lang.model.element.Name getSimpleName()
- Specified by:
getSimpleName in interface javax.lang.model.element.Element
hashCode
public int hashCode()
- Specified by:
hashCode in interface javax.lang.model.element.Element- Overrides:
hashCode in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equals in interface javax.lang.model.element.Element- Overrides:
equals in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
getFileName
public java.lang.String 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 interface IElementInfo
- Returns:
- the project-relative path, or null.
hides
public boolean hides(javax.lang.model.element.Element hidden)
- 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)