Package org.apache.xbean.recipe
Class ReflectionUtil
java.lang.Object
org.apache.xbean.recipe.ReflectionUtil
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static interface
static class
-
Method Summary
Modifier and TypeMethodDescriptionfindAllFieldsByType
(Class typeClass, Object propertyValue, Set<Option> options) Finds all valid setters for the property.findAllSettersByType
(Class typeClass, Object propertyValue, Set<Option> options) findConstructor
(Class typeClass, List<String> parameterNames, List<? extends Class<?>> parameterTypes, Set<String> availableProperties, Set<Option> options) static Field
static Method
findGetter
(Class typeClass, String propertyName, Set<Option> options) static Method
findInstanceFactory
(Class typeClass, String factoryMethod, Set<Option> options) static Method
static ReflectionUtil.StaticFactory
findStaticFactory
(Class typeClass, String factoryMethod, List<? extends Class<?>> parameterTypes, Set<Option> options) static ReflectionUtil.StaticFactory
findStaticFactory
(Class typeClass, String factoryMethod, List<String> parameterNames, List<? extends Class<?>> parameterTypes, Set<String> allProperties, Set<Option> options) getParameterNames
(Constructor<?> constructor) getParameterNames
(Method method)
-
Method Details
-
findField
-
findGetter
-
findSetter
-
findAllSetters
public static List<Method> findAllSetters(Class typeClass, String propertyName, Object propertyValue, Set<Option> options) Finds all valid setters for the property. Due to automatic type conversion there may be more than one possible setter that could be used to set the property. The setters that do not require type converstion will be a the head of the returned list of setters.- Parameters:
typeClass
- the class to search for setterspropertyName
- the name of the propertypropertyValue
- the value that must be settable either directly or after conversionoptions
- controls which setters are considered valid- Returns:
- the valid setters; never null or empty
-
findAllFieldsByType
-
findAllSettersByType
-
findConstructor
-
findConstructor
-
findStaticFactory
-
findStaticFactory
-
findInstanceFactory
-
getParameterNames
-
getParameterNames
-