Class JsonbAnnotatedElement<T extends AnnotatedElement>
- java.lang.Object
-
- org.eclipse.yasson.internal.model.JsonbAnnotatedElement<T>
-
- Type Parameters:
T
- annotated element
public class JsonbAnnotatedElement<T extends AnnotatedElement> extends Object
Annotation holder for classes, superclasses, interfaces, fields, getters and setters.
-
-
Constructor Summary
Constructors Constructor Description JsonbAnnotatedElement(T element)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <AT extends Annotation>
ATgetAnnotation(Class<AT> annotationClass)
Get an annotation by type.Annotation[]
getAnnotations()
T
getElement()
Gets element.void
putAnnotation(Annotation annotation)
Adds annotation.
-
-
-
Constructor Detail
-
JsonbAnnotatedElement
public JsonbAnnotatedElement(T element)
Creates a new instance.- Parameters:
element
- Element.
-
-
Method Detail
-
getElement
public T getElement()
Gets element.- Returns:
- Element.
-
getAnnotation
public <AT extends Annotation> AT getAnnotation(Class<AT> annotationClass)
Get an annotation by type.- Type Parameters:
AT
- Type of annotation- Parameters:
annotationClass
- Type of annotation- Returns:
- Annotation by passed type
-
getAnnotations
public Annotation[] getAnnotations()
-
putAnnotation
public void putAnnotation(Annotation annotation)
Adds annotation.- Parameters:
annotation
- Annotation to add.
-
-