- All Known Subinterfaces:
TypedElementInfo,io.helidon.common.types.TypedElementInfoBlueprint,TypeInfo,io.helidon.common.types.TypeInfoBlueprint
- All Known Implementing Classes:
TypedElementInfo.BuilderBase.TypedElementInfoImpl,TypeInfo.BuilderBase.TypeInfoImpl
public interface Annotated
Annotated elements provide annotations and their values.
-
Method Summary
Modifier and TypeMethodDescriptiondefault Annotationannotation(TypeName annotationType) Get an annotation on this annotated type.The list of known annotations for this element.default Optional<Annotation> findAnnotation(TypeName annotationType) Find an annotation on this annotated type.default booleanhasAnnotation(TypeName annotationType) Check if the annotation exists on this annotated.
-
Method Details
-
annotations
List<Annotation> annotations()The list of known annotations for this element. Note that "known" implies that the annotation is visible, which depends upon the context in which it was build.- Returns:
- the list of annotations on this element
-
findAnnotation
Find an annotation on this annotated type.- Parameters:
annotationType- annotation type- Returns:
- annotation with value (if found)
-
annotation
Get an annotation on this annotated type.- Parameters:
annotationType- annotation type- Returns:
- annotation with value
- Throws:
NoSuchElementException- if the annotation is not present on this element- See Also:
-
hasAnnotation
Check if the annotation exists on this annotated.- Parameters:
annotationType- type of annotation to find- Returns:
trueif the annotation exists on this annotated component
-