public class AnnotationBeanWiringInfoResolver extends java.lang.Object implements BeanWiringInfoResolver
BeanWiringInfoResolver
that
uses the Configurable annotation to identify which classes need autowiring.
The bean name to look up will be taken from the Configurable
annotation
if specified; otherwise the default will be the fully-qualified name of the
class being configured.Configurable
,
ClassNameBeanWiringInfoResolver
Constructor and Description |
---|
AnnotationBeanWiringInfoResolver() |
Modifier and Type | Method and Description |
---|---|
protected BeanWiringInfo |
buildWiringInfo(java.lang.Object beanInstance,
Configurable annotation)
Build the BeanWiringInfo for the given Configurable annotation.
|
protected java.lang.String |
getDefaultBeanName(java.lang.Object beanInstance)
Determine the default bean name for the specified bean instance.
|
BeanWiringInfo |
resolveWiringInfo(java.lang.Object beanInstance)
Resolve the BeanWiringInfo for the given bean instance.
|
public BeanWiringInfo resolveWiringInfo(java.lang.Object beanInstance)
BeanWiringInfoResolver
resolveWiringInfo
in interface BeanWiringInfoResolver
beanInstance
- the bean instance to resolve info fornull
if not foundprotected BeanWiringInfo buildWiringInfo(java.lang.Object beanInstance, Configurable annotation)
beanInstance
- the bean instanceannotation
- the Configurable annotation found on the bean classprotected java.lang.String getDefaultBeanName(java.lang.Object beanInstance)
The default implementation returns the superclass name for a CGLIB proxy and the name of the plain bean class else.
beanInstance
- the bean instance to build a default name forClassUtils.getUserClass(Class)