Class CodeElement<E extends javax.lang.model.element.Element>
- java.lang.Object
-
- com.oracle.truffle.dsl.processor.java.model.CodeElement<E>
-
- All Implemented Interfaces:
GeneratedElement
,javax.lang.model.AnnotatedConstruct
,javax.lang.model.element.Element
- Direct Known Subclasses:
CodeCompilationUnit
,CodeExecutableElement
,CodeTypeElement
,CodeVariableElement
,GeneratedPackageElement
public abstract class CodeElement<E extends javax.lang.model.element.Element> extends java.lang.Object implements javax.lang.model.element.Element, GeneratedElement
-
-
Constructor Summary
Constructors Constructor Description CodeElement(java.util.Set<javax.lang.model.element.Modifier> modifiers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description E
add(E element)
void
addAnnotationMirror(javax.lang.model.element.AnnotationMirror annotationMirror)
E
addOptional(E element)
<A extends java.lang.annotation.Annotation>
AgetAnnotation(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>
A[]getAnnotations(java.lang.Class<A> annotationType)
Support for some JDK8 builds.<A extends java.lang.annotation.Annotation>
A[]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()
-
-
-
Method Detail
-
setGeneratorAnnotationMirror
public void setGeneratorAnnotationMirror(javax.lang.model.element.AnnotationMirror mirror)
- Specified by:
setGeneratorAnnotationMirror
in interfaceGeneratedElement
-
setGeneratorElement
public void setGeneratorElement(javax.lang.model.element.Element element)
- Specified by:
setGeneratorElement
in interfaceGeneratedElement
-
getGeneratorAnnotationMirror
public javax.lang.model.element.AnnotationMirror getGeneratorAnnotationMirror()
- Specified by:
getGeneratorAnnotationMirror
in interfaceGeneratedElement
-
getGeneratorElement
public javax.lang.model.element.Element getGeneratorElement()
- Specified by:
getGeneratorElement
in interfaceGeneratedElement
-
remove
public void remove(E element)
-
getModifiers
public java.util.Set<javax.lang.model.element.Modifier> getModifiers()
- Specified by:
getModifiers
in interfacejavax.lang.model.element.Element
-
getEnclosedElements
public java.util.List<E> getEnclosedElements()
- Specified by:
getEnclosedElements
in interfacejavax.lang.model.element.Element
-
getAnnotationMirrors
public java.util.List<javax.lang.model.element.AnnotationMirror> getAnnotationMirrors()
- Specified by:
getAnnotationMirrors
in interfacejavax.lang.model.AnnotatedConstruct
- Specified by:
getAnnotationMirrors
in interfacejavax.lang.model.element.Element
-
getAnnotationsByType
public <A extends java.lang.annotation.Annotation> A[] getAnnotationsByType(java.lang.Class<A> annotationType)
Support JDK8 langtools.- Specified by:
getAnnotationsByType
in interfacejavax.lang.model.AnnotatedConstruct
- Parameters:
annotationType
-
-
getAnnotations
public <A extends java.lang.annotation.Annotation> A[] getAnnotations(java.lang.Class<A> annotationType)
Support for some JDK8 builds. (remove after jdk8 is released)- Parameters:
annotationType
-
-
getAnnotation
public <A extends java.lang.annotation.Annotation> A getAnnotation(java.lang.Class<A> annotationType)
Support for some JDK8 builds. (remove after jdk8 is released)- Specified by:
getAnnotation
in interfacejavax.lang.model.AnnotatedConstruct
- Specified by:
getAnnotation
in interfacejavax.lang.model.element.Element
- Parameters:
annotationType
-
-
addAnnotationMirror
public void addAnnotationMirror(javax.lang.model.element.AnnotationMirror annotationMirror)
-
setEnclosingElement
public void setEnclosingElement(javax.lang.model.element.Element parent)
-
getEnclosingElement
public javax.lang.model.element.Element getEnclosingElement()
- Specified by:
getEnclosingElement
in interfacejavax.lang.model.element.Element
-
getEnclosingClass
public CodeTypeElement getEnclosingClass()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-