Class AnnotationsUtil

java.lang.Object
io.github.hglabplh_tech.reflect.clojure.api.utils.AnnotationsUtil

public class AnnotationsUtil extends Object
This is a utility class for getting the Annotations belonging to a class method field
  • Constructor Details

    • AnnotationsUtil

      public AnnotationsUtil()
  • Method Details

    • getClassAnnots

      public static clojure.lang.IPersistentVector getClassAnnots(Class<?> clazz)
      get all annotations belonging to a class
      Parameters:
      clazz - the class to analyze
      Returns:
      a vector of annotation classes
    • getFieldAnnots

      public static clojure.lang.IPersistentVector getFieldAnnots(Field field)
      get all annotations belonging to a field
      Parameters:
      field - the field to analyze
      Returns:
      a vector of annotation classes
    • getMethodAnnots

      public static clojure.lang.IPersistentVector getMethodAnnots(Method meth)
      get all annotations belonging to a method
      Parameters:
      meth - the method to analyze
      Returns:
      a vector of annotation classes
    • getAnnotReturnType

      public static AnnotatedType getAnnotReturnType(Method meth)
      get the annotated return-type of a method
      Parameters:
      meth - the method to analyze
      Returns:
      a vector of annotation classes
    • getMethParamAnnots

      public static clojure.lang.IPersistentMap getMethParamAnnots(Method meth)
      get the annotations of the parameters of a method
      Parameters:
      meth - the method to analyze
      Returns:
      a map containing annotations by parameter
    • getCtorAnnots

      public static clojure.lang.IPersistentVector getCtorAnnots(Constructor<?> ctor)
      this function gets the annotations of a constructor
      Parameters:
      ctor - the constructor to analyze
      Returns:
    • getCtorParamAnnots

      public static clojure.lang.IPersistentMap getCtorParamAnnots(Constructor<?> ctor)
      get the annotations of the parameters of a constructor
      Parameters:
      ctor - the constructor to analyze
      Returns:
      a map containing annotations by parameter