public class

AnnotationBeanWiringInfoResolver

extends Object
implements BeanWiringInfoResolver
java.lang.Object
   ↳ org.springframework.beans.factory.annotation.AnnotationBeanWiringInfoResolver

Class Overview

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.

Summary

Public Constructors
AnnotationBeanWiringInfoResolver()
Public Methods
BeanWiringInfo resolveWiringInfo(Object beanInstance)
Resolve the BeanWiringInfo for the given bean instance.
Protected Methods
BeanWiringInfo buildWiringInfo(Object beanInstance, Configurable annotation)
Build the BeanWiringInfo for the given Configurable annotation.
String getDefaultBeanName(Object beanInstance)
Determine the default bean name for the specified bean instance.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.springframework.beans.factory.wiring.BeanWiringInfoResolver

Public Constructors

public AnnotationBeanWiringInfoResolver ()

Also: SpringBeans

Public Methods

public BeanWiringInfo resolveWiringInfo (Object beanInstance)

Also: SpringBeans

Resolve the BeanWiringInfo for the given bean instance.

Parameters
beanInstance the bean instance to resolve info for
Returns
  • the BeanWiringInfo, or null if not found

Protected Methods

protected BeanWiringInfo buildWiringInfo (Object beanInstance, Configurable annotation)

Also: SpringBeans

Build the BeanWiringInfo for the given Configurable annotation.

Parameters
beanInstance the bean instance
annotation the Configurable annotation found on the bean class
Returns
  • the resolved BeanWiringInfo

protected String getDefaultBeanName (Object beanInstance)

Also: SpringBeans

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 the bean instance to build a default name for
Returns
  • the default bean name to use