abstract class AutowireUtils
extends java.lang.Object
AbstractAutowireCapableBeanFactory
Modifier and Type | Class and Description |
---|---|
private static class |
AutowireUtils.ObjectFactoryDelegatingInvocationHandler
Reflective InvocationHandler for lazy access to the current target object.
|
Constructor and Description |
---|
AutowireUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isExcludedFromDependencyCheck(java.beans.PropertyDescriptor pd)
Determine whether the given bean property is excluded from dependency checks.
|
static boolean |
isSetterDefinedInInterface(java.beans.PropertyDescriptor pd,
java.util.Set<java.lang.Class> interfaces)
Return whether the setter method of the given bean property is defined
in any of the given interfaces.
|
static java.lang.Object |
resolveAutowiringValue(java.lang.Object autowiringValue,
java.lang.Class requiredType)
Resolve the given autowiring value against the given required type,
e.g.
|
static void |
sortConstructors(java.lang.reflect.Constructor[] constructors)
Sort the given constructors, preferring public constructors and "greedy" ones with
a maximum number of arguments.
|
static void |
sortFactoryMethods(java.lang.reflect.Method[] factoryMethods)
Sort the given factory methods, preferring public methods and "greedy" ones
with a maximum of arguments.
|
public static void sortConstructors(java.lang.reflect.Constructor[] constructors)
constructors
- the constructor array to sortpublic static void sortFactoryMethods(java.lang.reflect.Method[] factoryMethods)
factoryMethods
- the factory method array to sortpublic static boolean isExcludedFromDependencyCheck(java.beans.PropertyDescriptor pd)
This implementation excludes properties defined by CGLIB.
pd
- the PropertyDescriptor of the bean propertypublic static boolean isSetterDefinedInInterface(java.beans.PropertyDescriptor pd, java.util.Set<java.lang.Class> interfaces)
pd
- the PropertyDescriptor of the bean propertyinterfaces
- the Set of interfaces (Class objects)public static java.lang.Object resolveAutowiringValue(java.lang.Object autowiringValue, java.lang.Class requiredType)
ObjectFactory
value to its actual object result.autowiringValue
- the value to resolverequiredType
- the type to assign the result to