Class RuntimeBeanReference
java.lang.Object
org.springframework.beans.factory.config.RuntimeBeanReference
- All Implemented Interfaces:
- BeanMetadataElement,- BeanReference
Immutable placeholder class used for a property value object when it's
 a reference to another bean in the factory, to be resolved at runtime.
- Author:
- Rod Johnson, Juergen Hoeller
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionRuntimeBeanReference(Class<?> beanType) Create a new RuntimeBeanReference to a bean of the given type.RuntimeBeanReference(Class<?> beanType, boolean toParent) Create a new RuntimeBeanReference to a bean of the given type, with the option to mark it as reference to a bean in the parent factory.RuntimeBeanReference(String beanName) Create a new RuntimeBeanReference to the given bean name.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.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanReturn the requested bean name, or the fully-qualified type name in case of by-type resolution.Return the requested bean type if resolution by type is demanded.Return the configuration sourceObjectfor this metadata element (may benull).inthashCode()booleanReturn whether this is an explicit reference to a bean in the parent factory.voidSet the configuration sourceObjectfor this metadata element.toString()
- 
Constructor Details- 
RuntimeBeanReferenceCreate a new RuntimeBeanReference to the given bean name.- Parameters:
- beanName- name of the target bean
 
- 
RuntimeBeanReferenceCreate a new RuntimeBeanReference to the given bean name, with the option to mark it as reference to a bean in the parent factory.- Parameters:
- beanName- name of the target bean
- toParent- whether this is an explicit reference to a bean in the parent factory
 
- 
RuntimeBeanReferenceCreate a new RuntimeBeanReference to a bean of the given type.- Parameters:
- beanType- type of the target bean
- Since:
- 5.2
 
- 
RuntimeBeanReferenceCreate a new RuntimeBeanReference to a bean of the given type, with the option to mark it as reference to a bean in the parent factory.- Parameters:
- beanType- type of the target bean
- toParent- whether this is an explicit reference to a bean in the parent factory
- Since:
- 5.2
 
 
- 
- 
Method Details- 
getBeanNameReturn the requested bean name, or the fully-qualified type name in case of by-type resolution.- Specified by:
- getBeanNamein interface- BeanReference
- See Also:
 
- 
getBeanTypeReturn the requested bean type if resolution by type is demanded.- Since:
- 5.2
 
- 
isToParentpublic boolean isToParent()Return whether this is an explicit reference to a bean in the parent factory.
- 
setSourceSet the configuration sourceObjectfor this metadata element.The exact type of the object will depend on the configuration mechanism used. 
- 
getSourceDescription copied from interface:BeanMetadataElementReturn the configuration sourceObjectfor this metadata element (may benull).- Specified by:
- getSourcein interface- BeanMetadataElement
 
- 
equals
- 
hashCodepublic int hashCode()
- 
toString
 
-