Package com.cedarsoftware.util.reflect
Class ReflectionUtils
java.lang.Object
com.cedarsoftware.util.reflect.ReflectionUtils
-
Constructor Summary
-
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 Method
oneParameterMethodPreference
(Method method1, Method method2) Binary Operator that returns a method with zero parameters on conflict.static Method
zeroParameterMethodPreference
(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.
-