Interface AnnotationUtil
public interface AnnotationUtil
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic AnnotationgetAnnotation(Class<?> _class, Class<? extends Annotation> _annotation, String target, String key, String value) static <A extends Annotation>
AgetAnnotation(Class<?> _class, Class<A> _annotation) Get annotation object from classstatic <A extends Annotation>
AgetAnnotation(AccessibleObject _field, Class<A> _annotation) Get annotation object from fieldstatic AnnotationgetAnnotation(Parameter _class, Class<? extends Annotation> _annotation) getAnnotationData(Annotation _annotation) Get all data from annotationgetAnnotationData(Class<?> _class, Class<? extends Annotation> _annotation) Get all data from classgetAnnotationData(AccessibleObject target, Class<? extends Annotation> _annotation) getAnnotationData(Constructor<?> _class, Class<? extends Annotation> _annotation) getAnnotationData(Parameter _class, Class<? extends Annotation> _annotation) getAnnotationDataForField(Field _field, Class<? extends Annotation> _annotation) Get all data from fieldgetAnnotationDataForMethod(Method _method, Class<? extends Annotation> _annotation) Get all data from methodstatic FieldgetAnnotationField(Class<?> _class, Class<? extends Annotation> _annotation) Check and get annotation is contain fieldgetAnnotationFields(Class<?> _class, Class<? extends Annotation> _annotaion) Check and get all annotation contain in fieldstatic Annotation[]getAnnotations(Class<?> _class) Get all annotation from classstatic Annotation[]getAnnotations(Field _Field) Get all annotation from fieldstatic Annotation[]getAnnotations(Method _method) Get all annotation from methodgetAnnotionData(Object _object, Class<? extends Annotation> _annotation) Get all data from any objectstatic booleanisExistAnnotation(Class<?> _class, Class<? extends Annotation> _annotation) Check annotation is exist or not in classstatic booleanisExistAnnotation(Field _field, Class _annotation) Check annotation is exist or not in fieldstatic booleanisExistAnnotation(Method _method, Class _annotation) Check annotation is exist or not in method
-
Method Details
-
getAnnotation
Get annotation object from class- Parameters:
_class-_annotation-- Returns:
- annotation
-
getAnnotation
Get annotation object from field- Parameters:
_field-_annotation-- Returns:
- annotation
-
isExistAnnotation
Check annotation is exist or not in class- Parameters:
_class-_annotation-- Returns:
- boolean
-
isExistAnnotation
Check annotation is exist or not in field- Parameters:
_field-_annotation-- Returns:
- boolean
-
isExistAnnotation
Check annotation is exist or not in method- Parameters:
_method-_annotation-- Returns:
- boolean
-
getAnnotationField
Check and get annotation is contain field- Parameters:
_class-_annotation-- Returns:
- Field
-
getAnnotationFields
Check and get all annotation contain in field- Parameters:
_class-_annotation-- Returns:
- Field
-
getAnnotations
Get all annotation from class- Parameters:
_class-- Returns:
- Annotation[]
-
getAnnotations
Get all annotation from method- Parameters:
_class-- Returns:
- Annotation[]
-
getAnnotations
Get all annotation from field- Parameters:
_class-- Returns:
- Annotation[]
-
getAnnotationData
static Map<String,Object> getAnnotationData(Class<?> _class, Class<? extends Annotation> _annotation) Get all data from class- Parameters:
_class-_annotation-- Returns:
- map
-
getAnnotationData
static Map<String,Object> getAnnotationData(Constructor<?> _class, Class<? extends Annotation> _annotation) -
getAnnotationData
-
getAnnotation
-
getAnnotationDataForField
static Map<String,Object> getAnnotationDataForField(Field _field, Class<? extends Annotation> _annotation) Get all data from field- Parameters:
_field-_annotation-- Returns:
- map
-
getAnnotationDataForMethod
static Map<String,Object> getAnnotationDataForMethod(Method _method, Class<? extends Annotation> _annotation) Get all data from method- Parameters:
_method-_annotation-- Returns:
- map
-
getAnnotationData
Get all data from annotation- Parameters:
_annotation-- Returns:
- map
-
getAnnotionData
Get all data from any object- Parameters:
_object-_annotation-- Returns:
-
getAnnotation
static Annotation getAnnotation(Class<?> _class, Class<? extends Annotation> _annotation, String target, String key, String value) -
getAnnotationData
static Map<String,Object> getAnnotationData(AccessibleObject target, Class<? extends Annotation> _annotation)
-