public abstract class CodeElement<E extends javax.lang.model.element.Element> extends java.lang.Object implements javax.lang.model.element.Element, GeneratedElement
| Constructor and Description |
|---|
CodeElement(java.util.Set<javax.lang.model.element.Modifier> modifiers) |
| Modifier and Type | Method and Description |
|---|---|
E |
add(E element) |
void |
addAnnotationMirror(javax.lang.model.element.AnnotationMirror annotationMirror) |
E |
addOptional(E element) |
<A extends java.lang.annotation.Annotation> |
getAnnotation(java.lang.Class<A> annotationType)
Support for some JDK8 builds.
|
java.util.List<javax.lang.model.element.AnnotationMirror> |
getAnnotationMirrors() |
<A extends java.lang.annotation.Annotation> |
getAnnotations(java.lang.Class<A> annotationType)
Support for some JDK8 builds.
|
<A extends java.lang.annotation.Annotation> |
getAnnotationsByType(java.lang.Class<A> annotationType)
Support JDK8 langtools.
|
java.util.List<E> |
getEnclosedElements() |
CodeTypeElement |
getEnclosingClass() |
javax.lang.model.element.Element |
getEnclosingElement() |
javax.lang.model.element.AnnotationMirror |
getGeneratorAnnotationMirror() |
javax.lang.model.element.Element |
getGeneratorElement() |
java.util.Set<javax.lang.model.element.Modifier> |
getModifiers() |
void |
remove(E element) |
void |
setEnclosingElement(javax.lang.model.element.Element parent) |
void |
setGeneratorAnnotationMirror(javax.lang.model.element.AnnotationMirror mirror) |
void |
setGeneratorElement(javax.lang.model.element.Element element) |
java.lang.String |
toString() |
public CodeElement(java.util.Set<javax.lang.model.element.Modifier> modifiers)
public void setGeneratorAnnotationMirror(javax.lang.model.element.AnnotationMirror mirror)
setGeneratorAnnotationMirror in interface GeneratedElementpublic void setGeneratorElement(javax.lang.model.element.Element element)
setGeneratorElement in interface GeneratedElementpublic javax.lang.model.element.AnnotationMirror getGeneratorAnnotationMirror()
getGeneratorAnnotationMirror in interface GeneratedElementpublic javax.lang.model.element.Element getGeneratorElement()
getGeneratorElement in interface GeneratedElementpublic void remove(E element)
public java.util.Set<javax.lang.model.element.Modifier> getModifiers()
getModifiers in interface javax.lang.model.element.Elementpublic java.util.List<E> getEnclosedElements()
getEnclosedElements in interface javax.lang.model.element.Elementpublic java.util.List<javax.lang.model.element.AnnotationMirror> getAnnotationMirrors()
getAnnotationMirrors in interface javax.lang.model.element.Elementpublic <A extends java.lang.annotation.Annotation> A[] getAnnotationsByType(java.lang.Class<A> annotationType)
annotationType - public <A extends java.lang.annotation.Annotation> A[] getAnnotations(java.lang.Class<A> annotationType)
annotationType - public <A extends java.lang.annotation.Annotation> A getAnnotation(java.lang.Class<A> annotationType)
getAnnotation in interface javax.lang.model.element.ElementannotationType - public void addAnnotationMirror(javax.lang.model.element.AnnotationMirror annotationMirror)
public void setEnclosingElement(javax.lang.model.element.Element parent)
public javax.lang.model.element.Element getEnclosingElement()
getEnclosingElement in interface javax.lang.model.element.Elementpublic CodeTypeElement getEnclosingClass()
public java.lang.String toString()
toString in class java.lang.Object