|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BeanConfiguration
An interface that represent a runtime bean configuration Credit must go to Solomon Duskis and the article: http://jroller.com/page/Solomon?entry=programmatic_configuration_in_spring
Field Summary | |
---|---|
static String |
AUTOWIRE_BY_NAME
|
static String |
AUTOWIRE_BY_TYPE
|
Method Summary | |
---|---|
BeanConfiguration |
addProperty(String propertyName,
Object propertyValue)
Adds a property value to this bean |
AbstractBeanDefinition |
getBeanDefinition()
|
String |
getName()
|
Object |
getPropertyValue(String name)
Returns the value of the given property or throws a MissingPropertyException |
boolean |
hasProperty(String name)
Returns true if the bean config has the name property set |
boolean |
isSingleton()
|
BeanConfiguration |
setAbstract(boolean isAbstract)
Sets the BeanConfiguration as an Abstract bean definition |
BeanConfiguration |
setAutowire(String type)
Sets the autowire type, either "byType" or "byName" |
void |
setBeanDefinition(BeanDefinition definition)
|
BeanConfiguration |
setDependsOn(String[] dependsOn)
Sets the names of the beans this bean configuration depends on |
BeanConfiguration |
setDestroyMethod(String methodName)
Sets the name of the method to call when destroying the bean |
BeanConfiguration |
setFactoryBean(String beanName)
|
BeanConfiguration |
setFactoryMethod(String methodName)
|
void |
setName(String beanName)
Sets the name of the bean in the app ctx |
void |
setParent(Object name)
Sets the name of the parent bean |
void |
setPropertyValue(String property,
Object newValue)
Sets a property value on the bean configuration |
Field Detail |
---|
static final String AUTOWIRE_BY_TYPE
static final String AUTOWIRE_BY_NAME
Method Detail |
---|
String getName()
boolean isSingleton()
AbstractBeanDefinition getBeanDefinition()
BeanConfiguration addProperty(String propertyName, Object propertyValue)
propertyName
- The name of the propertypropertyValue
- The value of the property
BeanConfiguration setDestroyMethod(String methodName)
methodName
- The method name
BeanConfiguration setDependsOn(String[] dependsOn)
dependsOn
- Bean names it depends on
BeanConfiguration setFactoryBean(String beanName)
beanName
-
BeanConfiguration setFactoryMethod(String methodName)
methodName
-
BeanConfiguration setAutowire(String type)
type
- The type
void setName(String beanName)
beanName
- The bean nameboolean hasProperty(String name)
name
- The name of the property
Object getPropertyValue(String name)
name
- The name of the property
void setPropertyValue(String property, Object newValue)
property
- The name of the propertynewValue
- The valueBeanConfiguration setAbstract(boolean isAbstract)
isAbstract
- Whether its abstract or not
void setParent(Object name)
name
- Either a string which is the name of the bean, a RuntimeBeanReference or a BeanConfigurationvoid setBeanDefinition(BeanDefinition definition)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |