Class JsonbAnnotatedElement<T extends java.lang.reflect.AnnotatedElement>
- java.lang.Object
-
- org.eclipse.yasson.internal.model.JsonbAnnotatedElement<T>
-
- Type Parameters:
T- annotated element
public class JsonbAnnotatedElement<T extends java.lang.reflect.AnnotatedElement> extends java.lang.ObjectAnnotation 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 java.lang.annotation.Annotation>
ATgetAnnotation(java.lang.Class<AT> annotationClass)Get an annotation by type.java.lang.annotation.Annotation[]getAnnotations()TgetElement()Gets element.voidputAnnotation(java.lang.annotation.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 java.lang.annotation.Annotation> AT getAnnotation(java.lang.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 java.lang.annotation.Annotation[] getAnnotations()
-
putAnnotation
public void putAnnotation(java.lang.annotation.Annotation annotation)
Adds annotation.- Parameters:
annotation- Annotation to add.
-
-