org.eclipse.jdt.internal.compiler.apt.model
类 ElementImpl

java.lang.Object
  继承者 org.eclipse.jdt.internal.compiler.apt.model.ElementImpl
所有已实现的接口:
javax.lang.model.element.Element, IElementInfo
直接已知子类:
ExecutableElementImpl, PackageElementImpl, TypeElementImpl, TypeParameterElementImpl, VariableElementImpl

public abstract class ElementImpl
extends 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.


字段摘要
 Binding _binding
           
 BaseProcessingEnvImpl _env
           
 
构造方法摘要
protected ElementImpl(BaseProcessingEnvImpl env, Binding binding)
           
 
方法摘要
 javax.lang.model.type.TypeMirror asType()
           
 boolean equals(Object obj)
           
<A extends Annotation>
A
getAnnotation(Class<A> annotationClass)
           
protected abstract  AnnotationBinding[] getAnnotationBindings()
           
 List<? extends javax.lang.model.element.AnnotationMirror> getAnnotationMirrors()
           
 String getFileName()
          Get the project-relative path to the source file that contains this element.
 Set<javax.lang.model.element.Modifier> getModifiers()
           
 javax.lang.model.element.Name getSimpleName()
           
 int hashCode()
           
 boolean hides(javax.lang.model.element.Element hidden)
          Subclassed by VariableElementImpl, TypeElementImpl, and ExecutableElementImpl.
 String toString()
           
 
从类 java.lang.Object 继承的方法
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
从接口 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()
指定者:
接口 javax.lang.model.element.Element 中的 asType

getAnnotation

public <A extends Annotation> A getAnnotation(Class<A> annotationClass)
指定者:
接口 javax.lang.model.element.Element 中的 getAnnotation

getAnnotationBindings

protected abstract AnnotationBinding[] getAnnotationBindings()
返回:
the set of compiler annotation bindings on this element

getAnnotationMirrors

public List<? extends javax.lang.model.element.AnnotationMirror> getAnnotationMirrors()
指定者:
接口 javax.lang.model.element.Element 中的 getAnnotationMirrors

getModifiers

public Set<javax.lang.model.element.Modifier> getModifiers()
指定者:
接口 javax.lang.model.element.Element 中的 getModifiers

getSimpleName

public javax.lang.model.element.Name getSimpleName()
指定者:
接口 javax.lang.model.element.Element 中的 getSimpleName

hashCode

public int hashCode()
指定者:
接口 javax.lang.model.element.Element 中的 hashCode
覆盖:
Object 中的 hashCode

equals

public boolean equals(Object obj)
指定者:
接口 javax.lang.model.element.Element 中的 equals
覆盖:
Object 中的 equals

toString

public String toString()
覆盖:
Object 中的 toString

getFileName

public String getFileName()
从接口 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.

指定者:
接口 IElementInfo 中的 getFileName
返回:
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.

返回:
true if this element hides hidden
另请参见:
Elements#hides()


Copyright © 2013. All Rights Reserved.