Class DecoratedElement<E extends Element>
- java.lang.Object
-
- com.webcohesion.enunciate.javac.decorations.element.DecoratedElement<E>
-
- All Implemented Interfaces:
AnnotatedConstruct,Element
- Direct Known Subclasses:
DecoratedExecutableElement,DecoratedPackageElement,DecoratedTypeElement,DecoratedTypeParameterElement,DecoratedVariableElement
public class DecoratedElement<E extends Element> extends Object implements Element
-
-
Field Summary
Fields Modifier and Type Field Description protected Edelegateprotected DecoratedProcessingEnvironmentenv
-
Constructor Summary
Constructors Constructor Description DecoratedElement(E delegate, DecoratedProcessingEnvironment env)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R,P>
Raccept(ElementVisitor<R,P> v, P p)TypeMirrorasType()booleanequals(Object obj)<A extends Annotation>
AgetAnnotation(Class<A> annotationType)List<? extends AnnotationMirror>getAnnotationMirrors()Map<String,AnnotationMirror>getAnnotations()A map of annotations for this declaration.<A extends Annotation>
A[]getAnnotationsByType(Class<A> annotationType)EgetDelegate()StringgetDocComment()StringgetDocValue()The value of the java doc, before the block tags.StringgetDocValue(JavaDocTagHandler tagHandler)The value of the java doc, before the block tags.List<? extends Element>getEnclosedElements()ElementgetEnclosingElement()JavaDocgetJavaDoc()The javadoc for this declaration with the default tag handler.JavaDocgetJavaDoc(JavaDocTagHandler tagHandler)Get the JavaDoc for this element for the given tag handler.protected JavaDocgetJavaDoc(JavaDocTagHandler tagHandler, boolean useDelegate)ElementKindgetKind()Set<Modifier>getModifiers()NamegetSimpleName()StringgetSimpleNameString()booleanisAbstract()Whether the declaration isabstract.booleanisFinal()Whether the declaration isfinal.booleanisNative()Whether the declaration isnative.booleanisPrivate()Whether the declaration isprivate.booleanisProtected()Whether the declaration isprotected.booleanisPublic()Whether the declaration ispublic.booleanisStatic()Whether the declaration isstatic.booleanisStrictfp()Whether the declaration isstrictfp.booleanisSynchronized()Whether the declaration issynchronized.booleanisTransient()Whether the declaration istransient.booleanisVolatile()Whether the declaration isvolatile.StringtoString()
-
-
-
Field Detail
-
env
protected final DecoratedProcessingEnvironment env
-
-
Constructor Detail
-
DecoratedElement
public DecoratedElement(E delegate, DecoratedProcessingEnvironment env)
-
-
Method Detail
-
isPublic
public boolean isPublic()
Whether the declaration ispublic.- Returns:
- Whether the declaration is
public.
-
isProtected
public boolean isProtected()
Whether the declaration isprotected.- Returns:
- Whether the declaration is
protected.
-
isPrivate
public boolean isPrivate()
Whether the declaration isprivate.- Returns:
- Whether the declaration is
private.
-
isAbstract
public boolean isAbstract()
Whether the declaration isabstract.- Returns:
- Whether the declaration is
abstract.
-
isStatic
public boolean isStatic()
Whether the declaration isstatic.- Returns:
- Whether the declaration is
static.
-
isFinal
public boolean isFinal()
Whether the declaration isfinal.- Returns:
- Whether the declaration is
final.
-
isTransient
public boolean isTransient()
Whether the declaration istransient.- Returns:
- Whether the declaration is
transient.
-
isVolatile
public boolean isVolatile()
Whether the declaration isvolatile.- Returns:
- Whether the declaration is
volatile.
-
isSynchronized
public boolean isSynchronized()
Whether the declaration issynchronized.- Returns:
- Whether the declaration is
synchronized.
-
isNative
public boolean isNative()
Whether the declaration isnative.- Returns:
- Whether the declaration is
native.
-
isStrictfp
public boolean isStrictfp()
Whether the declaration isstrictfp.- Returns:
- Whether the declaration is
strictfp.
-
getDocComment
public String getDocComment()
-
getJavaDoc
public final JavaDoc getJavaDoc()
The javadoc for this declaration with the default tag handler.- Returns:
- The javadoc for this declaration with the default tag handler.
-
getJavaDoc
public final JavaDoc getJavaDoc(JavaDocTagHandler tagHandler)
Get the JavaDoc for this element for the given tag handler.- Parameters:
tagHandler- The tag handler.- Returns:
- The javadoc.
-
getJavaDoc
protected JavaDoc getJavaDoc(JavaDocTagHandler tagHandler, boolean useDelegate)
-
getDocValue
public final String getDocValue()
The value of the java doc, before the block tags.- Returns:
- The value of the java doc, before the block tags, or null if the value is the empty string.
-
getDocValue
public final String getDocValue(JavaDocTagHandler tagHandler)
The value of the java doc, before the block tags.- Parameters:
tagHandler- The tag handler.- Returns:
- The value of the java doc, before the block tags, or null if the value is the empty string.
-
getAnnotations
public Map<String,AnnotationMirror> getAnnotations()
A map of annotations for this declaration.- Returns:
- A map of annotations for this declaration.
-
asType
public TypeMirror asType()
-
getKind
public ElementKind getKind()
-
getEnclosingElement
public Element getEnclosingElement()
- Specified by:
getEnclosingElementin interfaceElement
-
getEnclosedElements
public List<? extends Element> getEnclosedElements()
- Specified by:
getEnclosedElementsin interfaceElement
-
accept
public <R,P> R accept(ElementVisitor<R,P> v, P p)
-
getAnnotationMirrors
public List<? extends AnnotationMirror> getAnnotationMirrors()
- Specified by:
getAnnotationMirrorsin interfaceAnnotatedConstruct- Specified by:
getAnnotationMirrorsin interfaceElement
-
getAnnotation
public <A extends Annotation> A getAnnotation(Class<A> annotationType)
- Specified by:
getAnnotationin interfaceAnnotatedConstruct- Specified by:
getAnnotationin interfaceElement
-
getAnnotationsByType
public <A extends Annotation> A[] getAnnotationsByType(Class<A> annotationType)
- Specified by:
getAnnotationsByTypein interfaceAnnotatedConstruct
-
getModifiers
public Set<Modifier> getModifiers()
- Specified by:
getModifiersin interfaceElement
-
getSimpleName
public Name getSimpleName()
- Specified by:
getSimpleNamein interfaceElement
-
getSimpleNameString
public String getSimpleNameString()
-
getDelegate
public E getDelegate()
-
equals
public boolean equals(Object obj)
-
-