Class JsonbAnnotated

  • All Implemented Interfaces:
    java.lang.reflect.AnnotatedElement
    Direct Known Subclasses:
    JsonbAnnotatedElement

    public class JsonbAnnotated
    extends java.lang.Object
    implements java.lang.reflect.AnnotatedElement
    Element wrapper containing merged annotation from class, superclasses and interfaces.
    Author:
    Roman Grigoriadi
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,​java.lang.annotation.Annotation> annotations  
    • Constructor Summary

      Constructors 
      Constructor Description
      JsonbAnnotated​(java.lang.annotation.Annotation[] initialAnnotations)
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T extends java.lang.annotation.Annotation>
      T
      getAnnotation​(java.lang.Class<T> annotationClass)  
      java.lang.annotation.Annotation[] getAnnotations()  
      java.lang.annotation.Annotation[] getDeclaredAnnotations()  
      void putAnnotation​(java.lang.annotation.Annotation annotation)
      Adds annotation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.reflect.AnnotatedElement

        getAnnotationsByType, getDeclaredAnnotation, getDeclaredAnnotationsByType, isAnnotationPresent
    • Field Detail

      • annotations

        protected final java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,​java.lang.annotation.Annotation> annotations
    • Constructor Detail

      • JsonbAnnotated

        public JsonbAnnotated​(java.lang.annotation.Annotation[] initialAnnotations)
        Creates a new instance.
        Parameters:
        initialAnnotations - Annotations to initialize from.
    • Method Detail

      • getAnnotation

        public <T extends java.lang.annotation.Annotation> T getAnnotation​(java.lang.Class<T> annotationClass)
        Specified by:
        getAnnotation in interface java.lang.reflect.AnnotatedElement
      • getAnnotations

        public java.lang.annotation.Annotation[] getAnnotations()
        Specified by:
        getAnnotations in interface java.lang.reflect.AnnotatedElement
      • getDeclaredAnnotations

        public java.lang.annotation.Annotation[] getDeclaredAnnotations()
        Specified by:
        getDeclaredAnnotations in interface java.lang.reflect.AnnotatedElement
      • putAnnotation

        public void putAnnotation​(java.lang.annotation.Annotation annotation)
        Adds annotation.
        Parameters:
        annotation - Annotation to add.