public class RuntimeBeanReference extends Object implements BeanReference
BeanDefinition.getPropertyValues()
,
BeanFactory.getBean(java.lang.String)
Constructor and Description |
---|
RuntimeBeanReference(String beanName)
Create a new RuntimeBeanReference to the given bean name,
without explicitly marking it as reference to a bean in
the parent factory.
|
RuntimeBeanReference(String beanName,
boolean toParent)
Create a new RuntimeBeanReference to the given bean name,
with the option to mark it as reference to a bean in
the parent factory.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
String |
getBeanName()
Return the target bean name that this reference points to (never
null ). |
Object |
getSource()
Return the configuration source
Object for this metadata element
(may be null ). |
int |
hashCode() |
boolean |
isToParent()
Return whether this is an explicit reference to a bean
in the parent factory.
|
void |
setSource(Object source)
Set the configuration source
Object for this metadata element. |
String |
toString() |
public RuntimeBeanReference(String beanName)
beanName
- name of the target beanpublic RuntimeBeanReference(String beanName, boolean toParent)
beanName
- name of the target beantoParent
- whether this is an explicit reference to
a bean in the parent factorypublic String getBeanName()
BeanReference
null
).getBeanName
in interface BeanReference
public boolean isToParent()
public void setSource(@Nullable Object source)
Object
for this metadata element.
The exact type of the object will depend on the configuration mechanism used.
@Nullable public Object getSource()
BeanMetadataElement
Object
for this metadata element
(may be null
).getSource
in interface BeanMetadataElement