Class MethsCtorsUtil
java.lang.Object
io.github.hglabplh_tech.reflect.clojure.api.utils.MethsCtorsUtil
This s a utility class for getting the definition data of
either a constructor or a method
-
Method Summary
Modifier and TypeMethodDescriptionstatic Class<?>getCtorDeclaringClass(Constructor<?> ctor) Get the constructors declaring classstatic clojure.lang.IPersistentVectorgetCtorExceptionTypes(Constructor<?> ctor) Get the exception types of a constructorstatic clojure.lang.IPersistentVectorgetCtorGenericExTypes(Constructor<?> ctor) Get the generic exception types of a constructorstatic IntegergetCtorModifiers(Constructor<?> ctor) Get the constructors modifiers integerstatic StringgetCtorName(Constructor<?> ctor) Get the constructors namestatic IntegergetCtorParamCount(Constructor<?> ctor) Get the constructors parameter countstatic clojure.lang.IPersistentVectorgetCtorParamTypes(Constructor<?> ctor) Get the constructors parameter typesstatic clojure.lang.IPersistentVectorgetDeclAnnotsCtor(Constructor<?> ctor) Get the annotations of a constructorstatic clojure.lang.IPersistentVectorgetDeclAnnotsMethod(Method meth) Get the annotations of a methodstatic Class<?>getMethDeclaringClass(Method method) Get the methods declaring classstatic clojure.lang.IPersistentVectorgetMethExceptionTypes(Method method) Get the methods exception typesstatic clojure.lang.IPersistentVectorgetMethGenericExTypes(Method method) Get the methods generic exception typesstatic clojure.lang.IPersistentVectorgetMethGenericParmTypes(Method method) Get the methods generic parameter typesstatic TypegetMethGenericReturnType(Method method) Get the methods generic return typestatic IntegergetMethodModifiers(Method method) Get the methods modifiers integerstatic StringgetMethodName(Method meth) Get the methods namestatic IntegergetMethodParamCount(Method method) Get the methods parameter countstatic clojure.lang.IPersistentVectorgetMethodParamTypes(Method method) Get the methods parameter typesstatic Class<?>getMethodReturnType(Method method) Get the methods return typestatic clojure.lang.IPersistentVectorgetTypeParamsCtor(Constructor<?> ctor) Get the type parameters of a constructorstatic clojure.lang.IPersistentVectorgetTypeParamsMethod(Method meth) Get the type parameters of a methodstatic BooleanisAnnotPresentCtor(Constructor<?> ctor, Class<? extends Annotation> annotation) Get info if a constructor has a annotation with type x true if yes / false otherwisestatic booleanisAnnotPresentMethod(Method meth, Class<? extends Annotation> annotation) Get info if a method has a annotation with type x true if yes / false otherwisestatic BooleanisBridgeMethod(Method method) Get info if method is a bridge true if yes / false otherwisestatic BooleanisDefaultMethod(Method method) Get info if method is a default method true if yes / false otherwisestatic BooleanisSyntheticCtor(Constructor<?> ctor) Get info if a constructor is snthetic true if yes / false otherwisestatic BooleanisSyntheticMethod(Method method) Get info if method is synthetic true if yes / false otherwisestatic BooleanisVarArgsCtor(Constructor<?> ctor) Get info if a constructor is with varargs true if yes / false otherwisestatic BooleanisVarArgsMethod(Method method) Get info if method is a varargs method - true if yes / false otherwise
-
Method Details
-
getCtorName
Get the constructors name- Parameters:
ctor- the constructor definition- Returns:
- the name of the constructor
-
getMethodName
Get the methods name- Parameters:
meth- the method definition- Returns:
- the name of the method
-
getCtorParamCount
Get the constructors parameter count- Parameters:
ctor- the constructor definition- Returns:
- the parameter count of the constructor
-
getCtorParamTypes
Get the constructors parameter types- Parameters:
ctor- the constructor definition- Returns:
- the parameter types of the constructor
-
getCtorModifiers
Get the constructors modifiers integer- Parameters:
ctor- the constructor definition- Returns:
- the modifiers integer of the constructor
-
getCtorDeclaringClass
Get the constructors declaring class- Parameters:
ctor- the constructor definition- Returns:
- the declatring class of the constructor
-
getMethodParamCount
Get the methods parameter count- Parameters:
method- the method definition- Returns:
- the methods parameter count
-
getMethodParamTypes
Get the methods parameter types- Parameters:
method- the method definition- Returns:
- the methods parameter types
-
getMethodReturnType
Get the methods return type- Parameters:
method- the method definition- Returns:
- the methods return type
-
getMethodModifiers
Get the methods modifiers integer- Parameters:
method- the method definition- Returns:
- the methods modifiers integer
-
getMethExceptionTypes
Get the methods exception types- Parameters:
method- the method definition- Returns:
- the methods exception type
-
getMethGenericExTypes
Get the methods generic exception types- Parameters:
method- the method definition- Returns:
- the methods generic exception types
-
getMethGenericParmTypes
Get the methods generic parameter types- Parameters:
method- the method definition- Returns:
- the methods generic parameter types
-
getMethGenericReturnType
Get the methods generic return type- Parameters:
method- the method definition- Returns:
- the methods generic return type
-
getMethDeclaringClass
Get the methods declaring class- Parameters:
method- the method definition- Returns:
- the methods declaring class
-
isBridgeMethod
Get info if method is a bridge true if yes / false otherwise- Parameters:
method- the method definition- Returns:
- true = yes / false = no
-
isDefaultMethod
Get info if method is a default method true if yes / false otherwise- Parameters:
method- the method definition- Returns:
- true = yes / false = no
-
isSyntheticMethod
Get info if method is synthetic true if yes / false otherwise- Parameters:
method- the method definition- Returns:
- true = yes / false = no
-
isVarArgsMethod
Get info if method is a varargs method - true if yes / false otherwise- Parameters:
method- the method definition- Returns:
- true = yes / false = no
-
isSyntheticCtor
Get info if a constructor is snthetic true if yes / false otherwise- Parameters:
ctor- the constructor definition- Returns:
- true = yes / false = no
-
isVarArgsCtor
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 definitionannotation- the annotations class- Returns:
- true = yes / false = no
-
isAnnotPresentMethod
Get info if a method has a annotation with type x true if yes / false otherwise- Parameters:
meth- the constructor definitionannotation- the annotations class- Returns:
- true = yes / false = no
-
getCtorExceptionTypes
Get the exception types of a constructor- Parameters:
ctor- the constructor definition- Returns:
- the exception types
-
getCtorGenericExTypes
Get the generic exception types of a constructor- Parameters:
ctor- the constructor definition- Returns:
- the generic exception types
-
getDeclAnnotsMethod
Get the annotations of a method- Parameters:
meth- the method definition- Returns:
- the methods annotations
-
getDeclAnnotsCtor
Get the annotations of a constructor- Parameters:
ctor- the constructor definition- Returns:
- the constructors annotations
-
getTypeParamsMethod
Get the type parameters of a method- Parameters:
meth- the method definition- Returns:
- the methods type parameters
-
getTypeParamsCtor
Get the type parameters of a constructor- Parameters:
ctor- the constructor definition- Returns:
- the constructors type parameters
-