Class XAnnotation<A extends Annotation>

java.lang.Object
org.jvnet.basicjaxb_annox.model.XAnnotation<A>

public class XAnnotation<A extends Annotation> extends Object
Defines an xannotation.
Author:
Aleksei Valikov
  • Field Details

    • EMPTY_ARRAY

      public static XAnnotation<?>[] EMPTY_ARRAY
      Empty array of annotations.
  • Constructor Details

    • XAnnotation

      public XAnnotation(Class<A> annotationClass, XAnnotationField<?>... fields) throws IllegalArgumentException
      Constructs an xannotation for the given annotation class.
      Parameters:
      annotationClass - annotation class, must not be null
      fields - fields of the xannotation.
      Throws:
      IllegalArgumentException - If annotation class is null, some required annotation fields are missing or some annotation fields have mismatching types.
  • Method Details

    • getAnnotationClass

      public Class<? extends Annotation> getAnnotationClass()
      Returns the annotation class.
      Returns:
      annotation class.
    • getAnnotationClassName

      public String getAnnotationClassName()
    • getFieldsList

      public List<XAnnotationField<?>> getFieldsList()
      Returns the list of the fields.
      Returns:
      list of the fields.
    • getFieldsMap

      public Map<String,XAnnotationField<?>> getFieldsMap()
      Returns the map of the fields.
      Returns:
      map of the fields.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getResult

      public A getResult()
      Returns the instance of the annotation for this xannotation.
      Returns:
      Instance of the annotation for this xannotation.