Package org.brijframework.util.reflect
Class AnnotationUtil
- java.lang.Object
-
- org.brijframework.util.reflect.AnnotationUtil
-
public abstract class AnnotationUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description AnnotationUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static AnnotationgetAnnotation(Class<?> _class, Class _annotation)Get annotation object from classstatic AnnotationgetAnnotation(Class<?> _class, Class<?> _annotation, String target, String key, String value)static AnnotationgetAnnotation(AccessibleObject _field, Class _annotation)Get annotation object from fieldstatic AnnotationgetAnnotation(Parameter _class, Class<? extends Annotation> _annotation)static Map<String,Object>getAnnotationData(Annotation _annotation)Get all data from annotationstatic Map<String,Object>getAnnotationData(Class<?> _class, Class<?> _annotation)Get all data from classstatic Map<String,Object>getAnnotationData(AccessibleObject target, Class<?> _annotation)static Map<String,Object>getAnnotationData(Constructor<?> _class, Class<?> _annotation)static Map<String,Object>getAnnotationData(Parameter _class, Class<? extends Annotation> _annotation)static Map<String,Object>getAnnotationDataForField(Field _field, Class<?> _annotation)Get all data from fieldstatic Map<String,Object>getAnnotationDataForMethod(Method _method, Class<?> _annotation)Get all data from methodstatic FieldgetAnnotationField(Class<?> _class, Class _annotation)Check and get annotation is contain fieldstatic List<Field>getAnnotationFields(Class<?> _class, Class<?> _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 methodstatic Map<String,Object>getAnnotionData(Object _object, Class<?> _annotation)Get all data from any objectstatic booleanisExistAnnotation(Class<?> _class, Class _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 Detail
-
getAnnotation
public static Annotation getAnnotation(Class<?> _class, Class _annotation)
Get annotation object from class- Parameters:
_class-_annotation-- Returns:
- annotation
-
getAnnotation
public static Annotation getAnnotation(AccessibleObject _field, Class _annotation)
Get annotation object from field- Parameters:
_field-_annotation-- Returns:
- annotation
-
isExistAnnotation
public static boolean isExistAnnotation(Class<?> _class, Class _annotation)
Check annotation is exist or not in class- Parameters:
_class-_annotation-- Returns:
- boolean
-
isExistAnnotation
public static boolean isExistAnnotation(Field _field, Class _annotation)
Check annotation is exist or not in field- Parameters:
_field-_annotation-- Returns:
- boolean
-
isExistAnnotation
public static boolean isExistAnnotation(Method _method, Class _annotation)
Check annotation is exist or not in method- Parameters:
_method-_annotation-- Returns:
- boolean
-
getAnnotationField
public static Field getAnnotationField(Class<?> _class, Class _annotation)
Check and get annotation is contain field- Parameters:
_class-_annotation-- Returns:
- Field
-
getAnnotationFields
public static List<Field> getAnnotationFields(Class<?> _class, Class<?> _annotaion)
Check and get all annotation contain in field- Parameters:
_class-_annotation-- Returns:
- Field
-
getAnnotations
public static Annotation[] getAnnotations(Class<?> _class)
Get all annotation from class- Parameters:
_class-- Returns:
- Annotation[]
-
getAnnotations
public static Annotation[] getAnnotations(Method _method)
Get all annotation from method- Parameters:
_class-- Returns:
- Annotation[]
-
getAnnotations
public static Annotation[] getAnnotations(Field _Field)
Get all annotation from field- Parameters:
_class-- Returns:
- Annotation[]
-
getAnnotationData
public static Map<String,Object> getAnnotationData(Class<?> _class, Class<?> _annotation)
Get all data from class- Parameters:
_class-_annotation-- Returns:
- map
-
getAnnotationData
public static Map<String,Object> getAnnotationData(Constructor<?> _class, Class<?> _annotation)
-
getAnnotationData
public static Map<String,Object> getAnnotationData(Parameter _class, Class<? extends Annotation> _annotation)
-
getAnnotation
public static Annotation getAnnotation(Parameter _class, Class<? extends Annotation> _annotation)
-
getAnnotationDataForField
public static Map<String,Object> getAnnotationDataForField(Field _field, Class<?> _annotation)
Get all data from field- Parameters:
_field-_annotation-- Returns:
- map
-
getAnnotationDataForMethod
public static Map<String,Object> getAnnotationDataForMethod(Method _method, Class<?> _annotation)
Get all data from method- Parameters:
_method-_annotation-- Returns:
- map
-
getAnnotationData
public static Map<String,Object> getAnnotationData(Annotation _annotation)
Get all data from annotation- Parameters:
_annotation-- Returns:
- map
-
getAnnotionData
public static Map<String,Object> getAnnotionData(Object _object, Class<?> _annotation)
Get all data from any object- Parameters:
_object-_annotation-- Returns:
-
getAnnotation
public static Annotation getAnnotation(Class<?> _class, Class<?> _annotation, String target, String key, String value)
-
getAnnotationData
public static Map<String,Object> getAnnotationData(AccessibleObject target, Class<?> _annotation)
-
-