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