Interface DelegatingElement
-
- All Superinterfaces:
AnnotatedConstruct,Element
- All Known Subinterfaces:
DelegatingExecutableElement,DelegatingTypeElement,LoggerMessageMethod,MessageInterface,MessageMethod,Parameter,ReturnType,ThrowableType
public interface DelegatingElement extends Element
A delegatingElementinterface. All methods are invoked on the delegate element by default.- Author:
- James R. Perkins
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <R,P>
Raccept(ElementVisitor<R,P> v, P p)default TypeMirrorasType()default <A extends Annotation>
AgetAnnotation(Class<A> annotationType)default List<? extends AnnotationMirror>getAnnotationMirrors()default <A extends Annotation>
A[]getAnnotationsByType(Class<A> annotationType)ElementgetDelegate()The element to delegate the default methods to.default List<? extends Element>getEnclosedElements()default ElementgetEnclosingElement()default ElementKindgetKind()default Set<Modifier>getModifiers()default NamegetSimpleName()default booleanisAnnotatedWith(Class<? extends Annotation> annotation)Checks whether or not the annotation is present on the element.
-
-
-
Method Detail
-
getDelegate
Element getDelegate()
The element to delegate the default methods to.- Returns:
- the delegate
-
asType
default TypeMirror asType()
-
getKind
default ElementKind getKind()
-
getModifiers
default Set<Modifier> getModifiers()
- Specified by:
getModifiersin interfaceElement
-
getSimpleName
default Name getSimpleName()
- Specified by:
getSimpleNamein interfaceElement
-
getEnclosingElement
default Element getEnclosingElement()
- Specified by:
getEnclosingElementin interfaceElement
-
getEnclosedElements
default List<? extends Element> getEnclosedElements()
- Specified by:
getEnclosedElementsin interfaceElement
-
getAnnotation
default <A extends Annotation> A getAnnotation(Class<A> annotationType)
- Specified by:
getAnnotationin interfaceAnnotatedConstruct- Specified by:
getAnnotationin interfaceElement
-
getAnnotationMirrors
default List<? extends AnnotationMirror> getAnnotationMirrors()
- Specified by:
getAnnotationMirrorsin interfaceAnnotatedConstruct- Specified by:
getAnnotationMirrorsin interfaceElement
-
accept
default <R,P> R accept(ElementVisitor<R,P> v, P p)
-
getAnnotationsByType
default <A extends Annotation> A[] getAnnotationsByType(Class<A> annotationType)
- Specified by:
getAnnotationsByTypein interfaceAnnotatedConstruct
-
isAnnotatedWith
default boolean isAnnotatedWith(Class<? extends Annotation> annotation)
Checks whether or not the annotation is present on the element.- Parameters:
annotation- the annotation to check for- Returns:
trueif the annotation is present, otherwisefalse
-
-