public abstract class AnnotationUtility extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
AnnotationUtility.AnnotationFilter |
static class |
AnnotationUtility.AnnotationFilterBuilder |
static interface |
AnnotationUtility.AnnotationFoundListener |
static interface |
AnnotationUtility.MethodFoundListener |
| Constructor and Description |
|---|
AnnotationUtility() |
| Modifier and Type | Method and Description |
|---|---|
static List<ModelAnnotation> |
buildAnnotationList(Element element) |
static List<ModelAnnotation> |
buildAnnotationList(Element element,
AnnotationUtility.AnnotationFilter filter)
Define for entity the model annotation set.
|
static List<String> |
extractAsArrayOfString(String value) |
static boolean |
extractAsBoolean(Element item,
Class<? extends Annotation> annotationClass,
AnnotationAttributeType attribute) |
static <E extends ModelEntity<?>> |
extractAsBoolean(E item,
ModelAnnotation annotation,
AnnotationAttributeType attribute)
Estract from an annotation of a method the attribute value specified
|
static String |
extractAsClassName(Element item,
Class<? extends Annotation> annotationClass,
AnnotationAttributeType attributeName)
Extract from an annotation of a method the attribute value specified.
|
static List<String> |
extractAsClassNameArray(Elements elementUtils,
Element item,
Class<? extends Annotation> annotationClass,
AnnotationAttributeType attributeName)
Extract from an annotation of a method the attribute value specified.
|
static String |
extractAsEnumerationValue(Element item,
Class<? extends Annotation> annotationClass,
AnnotationAttributeType attribute)
Estract from an annotation of a property the attribute value specified
|
static String |
extractAsEnumerationValue(ModelProperty property,
ModelAnnotation annotationClass,
AnnotationAttributeType attribute)
Estract from an annotation of a property the attribute value specified
|
static int |
extractAsInt(Element item,
Class<? extends Annotation> annotationClass,
AnnotationAttributeType attributeName) |
static String |
extractAsString(Element item,
Class<? extends Annotation> annotationClass,
AnnotationAttributeType attributeName)
Extract from an annotation of a method the attribute value specified.
|
static List<String> |
extractAsStringArray(Element item,
Class<? extends Annotation> annotationClass,
AnnotationAttributeType attributeName)
Extract from an annotation of a method the attribute value specified.
|
static List<String> |
extractAsStringArray(ModelMethod method,
ModelAnnotation annotationClass,
AnnotationAttributeType attribute)
Extract from an annotation of a method the attribute value specified.
|
static void |
forEachAnnotations(Element currentElement,
AnnotationUtility.AnnotationFilter filter,
AnnotationUtility.AnnotationFoundListener listener)
Iterate over annotations of currentElement.
|
static void |
forEachAnnotations(Element currentElement,
AnnotationUtility.AnnotationFoundListener listener)
Iterate over annotations of currentElement.
|
static Boolean |
getAnnotationAttributeAsBoolean(ModelWithAnnotation model,
Class<? extends Annotation> annotation,
AnnotationAttributeType attribute,
Boolean defaultValue) |
public static void forEachAnnotations(Element currentElement, AnnotationUtility.AnnotationFilter filter, AnnotationUtility.AnnotationFoundListener listener)
elementUtils - currentElement - filter - listener - public static void forEachAnnotations(Element currentElement, AnnotationUtility.AnnotationFoundListener listener)
elementUtils - currentElement - listener - public static List<String> extractAsClassNameArray(Elements elementUtils, Element item, Class<? extends Annotation> annotationClass, AnnotationAttributeType attributeName)
elementUtils - item - annotationClass - attributeName - public static String extractAsClassName(Element item, Class<? extends Annotation> annotationClass, AnnotationAttributeType attributeName)
elementUtils - item - annotationClass - attributeName - public static String extractAsString(Element item, Class<? extends Annotation> annotationClass, AnnotationAttributeType attributeName)
elementUtils - item - annotationClass - attributeName - public static List<String> extractAsStringArray(Element item, Class<? extends Annotation> annotationClass, AnnotationAttributeType attributeName)
elementUtils - item - annotationClass - attributeName - public static String extractAsEnumerationValue(Element item, Class<? extends Annotation> annotationClass, AnnotationAttributeType attribute)
elementUtils - property - property to analyzeannotationClass - annotation to analyzeattributeName - attribute typeName to analyzepublic static List<String> extractAsStringArray(ModelMethod method, ModelAnnotation annotationClass, AnnotationAttributeType attribute)
elementUtils - method - method to analyzeannotationClass - annotation to analyzeattributeName - attribute typeName to analyzepublic static String extractAsEnumerationValue(ModelProperty property, ModelAnnotation annotationClass, AnnotationAttributeType attribute)
elementUtils - property - property to analyzeannotationClass - annotation to analyzeattributeName - attribute typeName to analyzepublic static List<ModelAnnotation> buildAnnotationList(Element element, AnnotationUtility.AnnotationFilter filter)
elementUtils - entity - public static List<ModelAnnotation> buildAnnotationList(Element element)
public static int extractAsInt(Element item, Class<? extends Annotation> annotationClass, AnnotationAttributeType attributeName)
public static boolean extractAsBoolean(Element item, Class<? extends Annotation> annotationClass, AnnotationAttributeType attribute)
public static <E extends ModelEntity<?>> boolean extractAsBoolean(E item, ModelAnnotation annotation, AnnotationAttributeType attribute)
elementUtils - item - entity to analyzeannotation - annotation to analyzeattributeName - attribute typeName to analyzepublic static Boolean getAnnotationAttributeAsBoolean(ModelWithAnnotation model, Class<? extends Annotation> annotation, AnnotationAttributeType attribute, Boolean defaultValue)
Copyright © 2017. All rights reserved.