Package org.jvnet.jaxb.annox.model
Class XAnnotation<A extends Annotation>
- java.lang.Object
-
- org.jvnet.jaxb.annox.model.XAnnotation<A>
-
public class XAnnotation<A extends Annotation> extends Object
Defines an xannotation.- Author:
- Aleksei Valikov
-
-
Field Summary
Fields Modifier and Type Field Description static XAnnotation<?>[]EMPTY_ARRAYEmpty array of annotations.
-
Constructor Summary
Constructors Constructor Description XAnnotation(Class<A> annotationClass, XAnnotationField<?>... fields)Constructs an xannotation for the given annotation class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Class<? extends Annotation>getAnnotationClass()Returns the annotation class.StringgetAnnotationClassName()List<XAnnotationField<?>>getFieldsList()Returns the list of the fields.Map<String,XAnnotationField<?>>getFieldsMap()Returns the map of the fields.AgetResult()Returns the instance of the annotation for this xannotation.inthashCode()StringtoString()
-
-
-
Field Detail
-
EMPTY_ARRAY
public static XAnnotation<?>[] EMPTY_ARRAY
Empty array of annotations.
-
-
Constructor Detail
-
XAnnotation
public XAnnotation(Class<A> annotationClass, XAnnotationField<?>... fields) throws IllegalArgumentException
Constructs an xannotation for the given annotation class.- Parameters:
annotationClass- annotation class, must not benullfields- fields of the xannotation.- Throws:
IllegalArgumentException- If annotation class isnull, some required annotation fields are missing or some annotation fields have mismatching types.
-
-
Method Detail
-
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.
-
getResult
public A getResult()
Returns the instance of the annotation for this xannotation.- Returns:
- Instance of the annotation for this xannotation.
-
-