Top Description Fields Constructors Methods
org.springframework.beans.factory.wiring

public Class BeanWiringInfo

extends Object
Class Inheritance
Imports
org.springframework.beans.factory.config.AutowireCapableBeanFactory, org.springframework.lang.Nullable, org.springframework.util.Assert

Holder for bean wiring metadata information about a particular class. Used in conjunction with the org.springframework.beans.factory.annotation.Configurable annotation and the AspectJ AnnotationBeanConfigurerAspect.
Authors
Rod Johnson, Juergen Hoeller
Since
2.0
See Also
BeanWiringInfoResolver, org.springframework.beans.factory.config.AutowireCapableBeanFactory, org.springframework.beans.factory.annotation.Configurable

Field Summary

Modifier and TypeField and Description
public static final int
AUTOWIRE_BY_NAME

Constant that indicates autowiring bean properties by name.

public static final int
AUTOWIRE_BY_TYPE

Constant that indicates autowiring bean properties by type.

private int
private String
private boolean
private boolean

Constructor Summary

AccessConstructor and Description
public
BeanWiringInfo()

Create a default BeanWiringInfo that suggests plain initialization of factory and post-processor callbacks that the bean class may expect.

public
BeanWiringInfo(String
the name of the bean definition to take the property values from
beanName
)

Create a new BeanWiringInfo that points to the given bean name.

public
BeanWiringInfo(String
the name of the bean definition to take the property values from
beanName
,
boolean
whether the given bean name is a suggested default bean name, not necessarily matching an actual bean definition
isDefaultBeanName
)

Create a new BeanWiringInfo that points to the given bean name.

public
BeanWiringInfo(int
one of the constants AUTOWIRE_BY_NAME / AUTOWIRE_BY_TYPE
autowireMode
,
boolean
whether to perform a dependency check for object references in the bean instance (after autowiring)
dependencyCheck
)

Create a new BeanWiringInfo that indicates autowiring.

Method Summary

Modifier and TypeMethod and Description
public int
getAutowireMode()

Return one of the constants AUTOWIRE_BY_NAME / AUTOWIRE_BY_TYPE, if autowiring is indicated.

public String
getBeanName()

Return the specific bean name that this BeanWiringInfo points to, if any.

public boolean
getDependencyCheck()

Return whether to perform a dependency check for object references in the bean instance (after autowiring).

public boolean
indicatesAutowiring()

Return whether this BeanWiringInfo indicates autowiring.

public boolean
isDefaultBeanName()

Return whether the specific bean name is a suggested default bean name, not necessarily matching an actual bean definition in the factory.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

AUTOWIRE_BY_NAMEback to summary
public static final int AUTOWIRE_BY_NAME

Constant that indicates autowiring bean properties by name.

See Also
BeanWiringInfo(int, boolean), org.springframework.beans.factory.config.AutowireCapableBeanFactory#AUTOWIRE_BY_NAME
AUTOWIRE_BY_TYPEback to summary
public static final int AUTOWIRE_BY_TYPE

Constant that indicates autowiring bean properties by type.

See Also
BeanWiringInfo(int, boolean), org.springframework.beans.factory.config.AutowireCapableBeanFactory#AUTOWIRE_BY_TYPE
autowireModeback to summary
private int autowireMode
beanNameback to summary
private String beanName
Annotations
@Nullable
dependencyCheckback to summary
private boolean dependencyCheck
isDefaultBeanNameback to summary
private boolean isDefaultBeanName

Constructor Detail

BeanWiringInfoback to summary
public BeanWiringInfo()

Create a default BeanWiringInfo that suggests plain initialization of factory and post-processor callbacks that the bean class may expect.

BeanWiringInfoback to summary
public BeanWiringInfo(String beanName)

Create a new BeanWiringInfo that points to the given bean name.

Parameters
beanName:String

the name of the bean definition to take the property values from

Exceptions
IllegalArgumentException:
if the supplied beanName is null, is empty, or consists wholly of whitespace
BeanWiringInfoback to summary
public BeanWiringInfo(String beanName, boolean isDefaultBeanName)

Create a new BeanWiringInfo that points to the given bean name.

Parameters
beanName:String

the name of the bean definition to take the property values from

isDefaultBeanName:boolean

whether the given bean name is a suggested default bean name, not necessarily matching an actual bean definition

Exceptions
IllegalArgumentException:
if the supplied beanName is null, is empty, or consists wholly of whitespace
BeanWiringInfoback to summary
public BeanWiringInfo(int autowireMode, boolean dependencyCheck)

Create a new BeanWiringInfo that indicates autowiring.

Parameters
autowireMode:int

one of the constants AUTOWIRE_BY_NAME / AUTOWIRE_BY_TYPE

dependencyCheck:boolean

whether to perform a dependency check for object references in the bean instance (after autowiring)

Exceptions
IllegalArgumentException:
if the supplied autowireMode is not one of the allowed values
See Also
AUTOWIRE_BY_NAME, AUTOWIRE_BY_TYPE

Method Detail

getAutowireModeback to summary
public int getAutowireMode()

Return one of the constants AUTOWIRE_BY_NAME / AUTOWIRE_BY_TYPE, if autowiring is indicated.

getBeanNameback to summary
public String getBeanName()

Return the specific bean name that this BeanWiringInfo points to, if any.

Annotations
@Nullable
getDependencyCheckback to summary
public boolean getDependencyCheck()

Return whether to perform a dependency check for object references in the bean instance (after autowiring).

indicatesAutowiringback to summary
public boolean indicatesAutowiring()

Return whether this BeanWiringInfo indicates autowiring.

isDefaultBeanNameback to summary
public boolean isDefaultBeanName()

Return whether the specific bean name is a suggested default bean name, not necessarily matching an actual bean definition in the factory.