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

public class MethsCtorsUtil extends Object
This s a utility class for getting the definition data of either a constructor or a method
  • Method Details

    • getCtorName

      public static String getCtorName(Constructor<?> ctor)
      Get the constructors name
      Parameters:
      ctor - the constructor definition
      Returns:
      the name of the constructor
    • getMethodName

      public static String getMethodName(Method meth)
      Get the methods name
      Parameters:
      meth - the method definition
      Returns:
      the name of the method
    • getCtorParamCount

      public static Integer getCtorParamCount(Constructor<?> ctor)
      Get the constructors parameter count
      Parameters:
      ctor - the constructor definition
      Returns:
      the parameter count of the constructor
    • getCtorParamTypes

      public static clojure.lang.IPersistentVector getCtorParamTypes(Constructor<?> ctor)
      Get the constructors parameter types
      Parameters:
      ctor - the constructor definition
      Returns:
      the parameter types of the constructor
    • getCtorModifiers

      public static Integer getCtorModifiers(Constructor<?> ctor)
      Get the constructors modifiers integer
      Parameters:
      ctor - the constructor definition
      Returns:
      the modifiers integer of the constructor
    • getCtorDeclaringClass

      public static Class<?> getCtorDeclaringClass(Constructor<?> ctor)
      Get the constructors declaring class
      Parameters:
      ctor - the constructor definition
      Returns:
      the declatring class of the constructor
    • getMethodParamCount

      public static Integer getMethodParamCount(Method method)
      Get the methods parameter count
      Parameters:
      method - the method definition
      Returns:
      the methods parameter count
    • getMethodParamTypes

      public static clojure.lang.IPersistentVector getMethodParamTypes(Method method)
      Get the methods parameter types
      Parameters:
      method - the method definition
      Returns:
      the methods parameter types
    • getMethodReturnType

      public static Class<?> getMethodReturnType(Method method)
      Get the methods return type
      Parameters:
      method - the method definition
      Returns:
      the methods return type
    • getMethodModifiers

      public static Integer getMethodModifiers(Method method)
      Get the methods modifiers integer
      Parameters:
      method - the method definition
      Returns:
      the methods modifiers integer
    • getMethExceptionTypes

      public static clojure.lang.IPersistentVector getMethExceptionTypes(Method method)
      Get the methods exception types
      Parameters:
      method - the method definition
      Returns:
      the methods exception type
    • getMethGenericExTypes

      public static clojure.lang.IPersistentVector getMethGenericExTypes(Method method)
      Get the methods generic exception types
      Parameters:
      method - the method definition
      Returns:
      the methods generic exception types
    • getMethGenericParmTypes

      public static clojure.lang.IPersistentVector getMethGenericParmTypes(Method method)
      Get the methods generic parameter types
      Parameters:
      method - the method definition
      Returns:
      the methods generic parameter types
    • getMethGenericReturnType

      public static Type getMethGenericReturnType(Method method)
      Get the methods generic return type
      Parameters:
      method - the method definition
      Returns:
      the methods generic return type
    • getMethDeclaringClass

      public static Class<?> getMethDeclaringClass(Method method)
      Get the methods declaring class
      Parameters:
      method - the method definition
      Returns:
      the methods declaring class
    • isBridgeMethod

      public static Boolean isBridgeMethod(Method method)
      Get info if method is a bridge true if yes / false otherwise
      Parameters:
      method - the method definition
      Returns:
      true = yes / false = no
    • isDefaultMethod

      public static Boolean isDefaultMethod(Method method)
      Get info if method is a default method true if yes / false otherwise
      Parameters:
      method - the method definition
      Returns:
      true = yes / false = no
    • isSyntheticMethod

      public static Boolean isSyntheticMethod(Method method)
      Get info if method is synthetic true if yes / false otherwise
      Parameters:
      method - the method definition
      Returns:
      true = yes / false = no
    • isVarArgsMethod

      public static Boolean isVarArgsMethod(Method method)
      Get info if method is a varargs method - true if yes / false otherwise
      Parameters:
      method - the method definition
      Returns:
      true = yes / false = no
    • isSyntheticCtor

      public static Boolean isSyntheticCtor(Constructor<?> ctor)
      Get info if a constructor is snthetic true if yes / false otherwise
      Parameters:
      ctor - the constructor definition
      Returns:
      true = yes / false = no
    • isVarArgsCtor

      public static Boolean isVarArgsCtor(Constructor<?> ctor)
      Get info if a constructor is with varargs true if yes / false otherwise
      Parameters:
      ctor - the constructor definition
      Returns:
      true = yes / false = no
    • isAnnotPresentCtor

      public static Boolean isAnnotPresentCtor(Constructor<?> ctor, Class<? extends Annotation> annotation)
      Get info if a constructor has a annotation with type x true if yes / false otherwise
      Parameters:
      ctor - the constructor definition
      annotation - the annotations class
      Returns:
      true = yes / false = no
    • isAnnotPresentMethod

      public static boolean isAnnotPresentMethod(Method meth, Class<? extends Annotation> annotation)
      Get info if a method has a annotation with type x true if yes / false otherwise
      Parameters:
      meth - the constructor definition
      annotation - the annotations class
      Returns:
      true = yes / false = no
    • getCtorExceptionTypes

      public static clojure.lang.IPersistentVector getCtorExceptionTypes(Constructor<?> ctor)
      Get the exception types of a constructor
      Parameters:
      ctor - the constructor definition
      Returns:
      the exception types
    • getCtorGenericExTypes

      public static clojure.lang.IPersistentVector getCtorGenericExTypes(Constructor<?> ctor)
      Get the generic exception types of a constructor
      Parameters:
      ctor - the constructor definition
      Returns:
      the generic exception types
    • getDeclAnnotsMethod

      public static clojure.lang.IPersistentVector getDeclAnnotsMethod(Method meth)
      Get the annotations of a method
      Parameters:
      meth - the method definition
      Returns:
      the methods annotations
    • getDeclAnnotsCtor

      public static clojure.lang.IPersistentVector getDeclAnnotsCtor(Constructor<?> ctor)
      Get the annotations of a constructor
      Parameters:
      ctor - the constructor definition
      Returns:
      the constructors annotations
    • getTypeParamsMethod

      public static clojure.lang.IPersistentVector getTypeParamsMethod(Method meth)
      Get the type parameters of a method
      Parameters:
      meth - the method definition
      Returns:
      the methods type parameters
    • getTypeParamsCtor

      public static clojure.lang.IPersistentVector getTypeParamsCtor(Constructor<?> ctor)
      Get the type parameters of a constructor
      Parameters:
      ctor - the constructor definition
      Returns:
      the constructors type parameters