Class RuntimeBeanNameReference
- java.lang.Object
- org.springframework.beans.factory.config.RuntimeBeanNameReference
- All Implemented Interfaces:
BeanMetadataElement,BeanReference
public class RuntimeBeanNameReference extends Object implements BeanReference
Immutable placeholder class used for a property value object when it's a reference to another bean name in the factory, to be resolved at runtime.- Since:
- 2.0
- Author:
- Juergen Hoeller
- See Also:
RuntimeBeanReference,BeanDefinition.getPropertyValues(),BeanFactory.getBean(java.lang.String)
Constructor Summary
Constructors Constructor Description RuntimeBeanNameReference(String beanName)Create a new RuntimeBeanNameReference to the given bean name.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object other)StringgetBeanName()Return the target bean name that this reference points to (nevernull).ObjectgetSource()Return the configuration sourceObjectfor this metadata element (may benull).inthashCode()voidsetSource(Object source)Set the configuration sourceObjectfor this metadata element.StringtoString()
Constructor Detail
RuntimeBeanNameReference
public RuntimeBeanNameReference(String beanName)
Create a new RuntimeBeanNameReference to the given bean name.- Parameters:
beanName- name of the target bean
Method Detail
getBeanName
public String getBeanName()
Description copied from interface:BeanReferenceReturn the target bean name that this reference points to (nevernull).- Specified by:
getBeanNamein interfaceBeanReference
setSource
public void setSource(Object source)
Set the configuration sourceObjectfor this metadata element.The exact type of the object will depend on the configuration mechanism used.
getSource
public Object getSource()
Description copied from interface:BeanMetadataElementReturn the configuration sourceObjectfor this metadata element (may benull).- Specified by:
getSourcein interfaceBeanMetadataElement