public interface BeanConfiguration
Represents a runtime bean configuration. Credit must go to Solomon Duskis and the article: http://jroller.com/page/Solomon?entry=programmatic_configuration_in_spring
Type Params | Return Type | Name and description |
---|---|---|
|
public BeanConfiguration |
addProperty(String propertyName, Object propertyValue) Adds a property value to this bean. |
|
public AbstractBeanDefinition |
getBeanDefinition()
|
|
public String |
getName()
|
|
public Object |
getPropertyValue(String name) Returns the value of the given property or throws a MissingPropertyException. |
|
public Resource |
getResource() |
|
public boolean |
hasProperty(String name) Returns true if the bean config has the name property set. |
|
public boolean |
isConditionOn() |
|
public boolean |
isSingleton()
|
|
public BeanConfiguration |
setAbstract(boolean isAbstract) Sets the BeanConfiguration as an Abstract bean definition |
|
public BeanConfiguration |
setAutowire(String type) Sets the autowire type, either "byType" or "byName" |
|
public void |
setBeanDefinition(BeanDefinition definition) |
|
public BeanConfiguration |
setDependsOn(String[] dependsOn) Sets the names of the beans this bean configuration depends on |
|
public BeanConfiguration |
setDestroyMethod(String methodName) Sets the name of the method to call when destroying the bean. |
|
public BeanConfiguration |
setFactoryBean(String beanName)
|
|
public BeanConfiguration |
setFactoryMethod(String methodName)
|
|
public void |
setName(String beanName) Sets the name of the bean in the app ctx. |
|
public void |
setParent(Object name) Sets the name of the parent bean. |
|
public void |
setPropertyValue(String property, Object newValue) Sets a property value on the bean configuration |
|
public void |
setResource(Resource resource) Set the resource that this bean definition came from. |
Adds a property value to this bean.
propertyName
- The name of the propertypropertyValue
- The value of the property
Returns the value of the given property or throws a MissingPropertyException.
name
- The name of the propertyReturns true if the bean config has the name property set.
name
- The name of the property
Sets the BeanConfiguration as an Abstract bean definition
isAbstract
- Whether its abstract or notSets the autowire type, either "byType" or "byName"
type
- The typeSets the names of the beans this bean configuration depends on
dependsOn
- Bean names it depends onSets the name of the method to call when destroying the bean.
methodName
- The method name
Sets the name of the bean in the app ctx.
beanName
- The bean nameSets the name of the parent bean.
name
- Either a string which is the name of the bean, a RuntimeBeanReference or a BeanConfigurationSets a property value on the bean configuration
property
- The name of the propertynewValue
- The valueSet the resource that this bean definition came from.
resource
- the resource