Interface DelegatingElement
- All Superinterfaces:
AnnotatedConstruct
,Element
- All Known Subinterfaces:
DelegatingExecutableElement
,DelegatingTypeElement
,MessageInterface
,MessageMethod
,Parameter
,ReturnType
,ThrowableType
A delegating
Element
interface. All methods are invoked on the delegate element
by default.- Author:
- James R. Perkins
-
Method Summary
Modifier and TypeMethodDescriptiondefault <R,
P> R accept
(ElementVisitor<R, P> v, P p) default TypeMirror
asType()
default <A extends Annotation>
AgetAnnotation
(Class<A> annotationType) default List<? extends AnnotationMirror>
default <A extends Annotation>
A[]getAnnotationsByType
(Class<A> annotationType) The element to delegate the default methods to.default Element
default ElementKind
getKind()
default Name
default boolean
isAnnotatedWith
(Class<? extends Annotation> annotation) Checks whether or not the annotation is present on the element.
-
Method Details
-
getDelegate
Element getDelegate()The element to delegate the default methods to.- Returns:
- the delegate
-
asType
-
getKind
-
getModifiers
- Specified by:
getModifiers
in interfaceElement
-
getSimpleName
- Specified by:
getSimpleName
in interfaceElement
-
getEnclosingElement
- Specified by:
getEnclosingElement
in interfaceElement
-
getEnclosedElements
- Specified by:
getEnclosedElements
in interfaceElement
-
getAnnotation
- Specified by:
getAnnotation
in interfaceAnnotatedConstruct
- Specified by:
getAnnotation
in interfaceElement
-
getAnnotationMirrors
- Specified by:
getAnnotationMirrors
in interfaceAnnotatedConstruct
- Specified by:
getAnnotationMirrors
in interfaceElement
-
accept
-
getAnnotationsByType
- Specified by:
getAnnotationsByType
in interfaceAnnotatedConstruct
-
isAnnotatedWith
Checks whether or not the annotation is present on the element.- Parameters:
annotation
- the annotation to check for- Returns:
true
if the annotation is present, otherwisefalse
-