Interface AnnotationUtil


public interface AnnotationUtil
  • Method Details

    • getAnnotation

      static <A extends Annotation> A getAnnotation(Class<?> _class, Class<A> _annotation)
      Get annotation object from class
      Parameters:
      _class -
      _annotation -
      Returns:
      annotation
    • getAnnotation

      static <A extends Annotation> A getAnnotation(AccessibleObject _field, Class<A> _annotation)
      Get annotation object from field
      Parameters:
      _field -
      _annotation -
      Returns:
      annotation
    • isExistAnnotation

      static boolean isExistAnnotation(Class<?> _class, Class<? extends Annotation> _annotation)
      Check annotation is exist or not in class
      Parameters:
      _class -
      _annotation -
      Returns:
      boolean
    • isExistAnnotation

      static boolean isExistAnnotation(Field _field, Class _annotation)
      Check annotation is exist or not in field
      Parameters:
      _field -
      _annotation -
      Returns:
      boolean
    • isExistAnnotation

      static boolean isExistAnnotation(Method _method, Class _annotation)
      Check annotation is exist or not in method
      Parameters:
      _method -
      _annotation -
      Returns:
      boolean
    • getAnnotationField

      static Field getAnnotationField(Class<?> _class, Class<? extends Annotation> _annotation)
      Check and get annotation is contain field
      Parameters:
      _class -
      _annotation -
      Returns:
      Field
    • getAnnotationFields

      static List<Field> getAnnotationFields(Class<?> _class, Class<? extends Annotation> _annotaion)
      Check and get all annotation contain in field
      Parameters:
      _class -
      _annotation -
      Returns:
      Field
    • getAnnotations

      static Annotation[] getAnnotations(Class<?> _class)
      Get all annotation from class
      Parameters:
      _class -
      Returns:
      Annotation[]
    • getAnnotations

      static Annotation[] getAnnotations(Method _method)
      Get all annotation from method
      Parameters:
      _class -
      Returns:
      Annotation[]
    • getAnnotations

      static Annotation[] getAnnotations(Field _Field)
      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

      static Map<String,Object> getAnnotationData(Parameter _class, Class<? extends Annotation> _annotation)
    • getAnnotation

      static Annotation getAnnotation(Parameter _class, Class<? extends Annotation> _annotation)
    • 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

      static Map<String,Object> getAnnotationData(Annotation _annotation)
      Get all data from annotation
      Parameters:
      _annotation -
      Returns:
      map
    • getAnnotionData

      static Map<String,Object> getAnnotionData(Object _object, Class<? extends Annotation> _annotation)
      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)