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 boolean
equals(Object other)
String
getBeanName()
Return the target bean name that this reference points to (nevernull
).Object
getSource()
Return the configuration sourceObject
for this metadata element (may benull
).int
hashCode()
void
setSource(Object source)
Set the configuration sourceObject
for this metadata element.String
toString()
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:BeanReference
Return the target bean name that this reference points to (nevernull
).- Specified by:
getBeanName
in interfaceBeanReference
setSource
public void setSource(@Nullable Object source)
Set the configuration sourceObject
for this metadata element.The exact type of the object will depend on the configuration mechanism used.
getSource
@Nullable public Object getSource()
Description copied from interface:BeanMetadataElement
Return the configuration sourceObject
for this metadata element (may benull
).- Specified by:
getSource
in interfaceBeanMetadataElement