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 Details

    • JsonbAnnotatedElement

      public JsonbAnnotatedElement(T element)
      Creates a new instance.
      Parameters:
      element - Element.
  • Method Details

    • 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.