Module org.eclipse.yasson
Class JsonbAnnotatedElement<T extends AnnotatedElement>
java.lang.Object
org.eclipse.yasson.internal.model.JsonbAnnotatedElement<T>
- Type Parameters:
T- annotated element
Annotation holder for classes, superclasses, interfaces, fields, getters and setters.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<AT extends Annotation>
Optional<AT>getAnnotation(Class<AT> annotationClass) Get an annotation by type.<AT extends Annotation>
LinkedList<JsonbAnnotatedElement.AnnotationWrapper<?>>getAnnotations(Class<AT> annotationClass) <AT extends Annotation>
JsonbAnnotatedElement.AnnotationWrapper<AT>getAnnotationWrapper(Class<AT> annotationClass) Gets element.voidputAnnotation(Annotation annotation, boolean inherited, Class<?> definedType) Adds annotation.voidputAnnotationWrapper(JsonbAnnotatedElement.AnnotationWrapper<?> annotationWrapper)
-
Constructor Details
-
JsonbAnnotatedElement
Creates a new instance.- Parameters:
element- Element.
-
-
Method Details
-
getElement
Gets element.- Returns:
- Element.
-
getAnnotation
Get an annotation by type.- Type Parameters:
AT- Type of annotation- Parameters:
annotationClass- Type of annotation- Returns:
- Annotation by passed type
-
getAnnotations
public <AT extends Annotation> LinkedList<JsonbAnnotatedElement.AnnotationWrapper<?>> getAnnotations(Class<AT> annotationClass) -
getAnnotationWrapper
public <AT extends Annotation> JsonbAnnotatedElement.AnnotationWrapper<AT> getAnnotationWrapper(Class<AT> annotationClass) -
getAnnotations
-
putAnnotation
Adds annotation.- Parameters:
annotation- Annotation to add.definedType-
-
putAnnotationWrapper
-