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