Top Description Constructors Methods
org.springframework.beans.factory.annotation

public Class AnnotationBeanWiringInfoResolver

extends Object
implements BeanWiringInfoResolver
Class Inheritance
All Implemented Interfaces
org.springframework.beans.factory.wiring.BeanWiringInfoResolver
Imports
org.springframework.beans.factory.wiring.BeanWiringInfo, .BeanWiringInfoResolver, org.springframework.lang.Nullable, org.springframework.util.Assert, .ClassUtils

org.springframework.beans.factory.wiring.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.
Authors
Rod Johnson, Juergen Hoeller
Since
2.0
See Also
Configurable, org.springframework.beans.factory.wiring.ClassNameBeanWiringInfoResolver

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected BeanWiringInfo

Returns:

the resolved BeanWiringInfo
buildWiringInfo
(Object
the bean instance
beanInstance
,
Configurable
the Configurable annotation found on the bean class
annotation
)

Build the BeanWiringInfo for the given Configurable annotation.

protected String

Returns:

the default bean name to use
getDefaultBeanName
(Object
the bean instance to build a default name for
beanInstance
)

Determine the default bean name for the specified bean instance.

public BeanWiringInfo
resolveWiringInfo(Object
the bean instance to resolve info for
beanInstance
)

Implements org.springframework.beans.factory.wiring.BeanWiringInfoResolver.resolveWiringInfo.

Resolve the BeanWiringInfo for the given bean instance.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AnnotationBeanWiringInfoResolverback to summary
public AnnotationBeanWiringInfoResolver()

Method Detail

buildWiringInfoback to summary
protected BeanWiringInfo buildWiringInfo(Object beanInstance, Configurable annotation)

Build the BeanWiringInfo for the given Configurable annotation.

Parameters
beanInstance:Object

the bean instance

annotation:Configurable

the Configurable annotation found on the bean class

Returns:BeanWiringInfo

the resolved BeanWiringInfo

getDefaultBeanNameback to summary
protected String getDefaultBeanName(Object beanInstance)

Determine the default bean name for the specified bean instance.

The default implementation returns the superclass name for a CGLIB proxy and the name of the plain bean class else.

Parameters
beanInstance:Object

the bean instance to build a default name for

Returns:String

the default bean name to use

See Also
org.springframework.util.ClassUtils#getUserClass(Class)
resolveWiringInfoback to summary
public BeanWiringInfo resolveWiringInfo(Object beanInstance)

Implements org.springframework.beans.factory.wiring.BeanWiringInfoResolver.resolveWiringInfo.

Doc from org.springframework.beans.factory.wiring.BeanWiringInfoResolver.resolveWiringInfo.

Resolve the BeanWiringInfo for the given bean instance.

Parameters
beanInstance:Object

the bean instance to resolve info for

Returns:BeanWiringInfo

the BeanWiringInfo, or null if not found

Annotations
@Override
@Nullable