Interface DelegatingElement
-
- All Superinterfaces:
AnnotatedConstruct
,Element
- All Known Subinterfaces:
DelegatingExecutableElement
,DelegatingTypeElement
,MessageInterface
,MessageMethod
,Parameter
,ReturnType
,ThrowableType
public interface DelegatingElement extends Element
A delegatingElement
interface. 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 TypeMirror
asType()
default <A extends Annotation>
AgetAnnotation(Class<A> annotationType)
default List<? extends AnnotationMirror>
getAnnotationMirrors()
default <A extends Annotation>
A[]getAnnotationsByType(Class<A> annotationType)
Element
getDelegate()
The element to delegate the default methods to.default List<? extends Element>
getEnclosedElements()
default Element
getEnclosingElement()
default ElementKind
getKind()
default Set<Modifier>
getModifiers()
default Name
getSimpleName()
default boolean
isAnnotatedWith(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:
getModifiers
in interfaceElement
-
getSimpleName
default Name getSimpleName()
- Specified by:
getSimpleName
in interfaceElement
-
getEnclosingElement
default Element getEnclosingElement()
- Specified by:
getEnclosingElement
in interfaceElement
-
getEnclosedElements
default List<? extends Element> getEnclosedElements()
- Specified by:
getEnclosedElements
in interfaceElement
-
getAnnotation
default <A extends Annotation> A getAnnotation(Class<A> annotationType)
- Specified by:
getAnnotation
in interfaceAnnotatedConstruct
- Specified by:
getAnnotation
in interfaceElement
-
getAnnotationMirrors
default List<? extends AnnotationMirror> getAnnotationMirrors()
- Specified by:
getAnnotationMirrors
in interfaceAnnotatedConstruct
- Specified by:
getAnnotationMirrors
in 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:
getAnnotationsByType
in 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:
true
if the annotation is present, otherwisefalse
-
-