Package com.cedarsoftware.util.reflect
Class ReflectionUtils
java.lang.Object
com.cedarsoftware.util.reflect.ReflectionUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildAccessorMap(Class<?> c) Builds a list of methods with zero parameter methods taking precedence over overrides for a given single level class.buildInjectorMap(Class<?> c) Builds a list of methods with zero parameter methods taking precedence over overrides for a given single level class.static MethodoneParameterMethodPreference(Method method1, Method method2) Binary Operator that returns a method with zero parameters on conflict.static MethodzeroParameterMethodPreference(Method method1, Method method2) Binary Operator that returns a method with zero parameters on conflict.
-
Constructor Details
-
ReflectionUtils
public ReflectionUtils()
-
-
Method Details
-
buildAccessorMap
Builds a list of methods with zero parameter methods taking precedence over overrides for a given single level class.- Parameters:
c- - class to get the declared methods for- Returns:
- Map of name of the method to the actual emthod
-
buildInjectorMap
Builds a list of methods with zero parameter methods taking precedence over overrides for a given single level class.- Parameters:
c- - class to get the declared methods for- Returns:
- Map of name of the method to the actual emthod
-
zeroParameterMethodPreference
Binary Operator that returns a method with zero parameters on conflict.- Parameters:
method1- - 1st method to comparemethod2- - 2nd method to compare- Returns:
- in the case over overloads choose the method with 0 parameters.
-
oneParameterMethodPreference
Binary Operator that returns a method with zero parameters on conflict.- Parameters:
method1- - 1st method to comparemethod2- - 2nd method to compare- Returns:
- in the case over overloads choose the method with 0 parameters.
-