|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD |
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
Field Summary | |
---|---|
java.lang.String |
AUTOWIRE_BY_NAME
|
java.lang.String |
AUTOWIRE_BY_TYPE
|
Method Summary | |
---|---|
BeanConfiguration
|
addProperty(java.lang.String propertyName, java.lang.Object propertyValue)
Adds a property value to this bean. |
void
|
addQualifier(java.lang.String name)
Add a qualifier to the bean definition. |
void
|
addQualifier(java.lang.Class qualifierClass, java.lang.String name)
A qualifier, using a custom annotation, to the bean definition. |
org.springframework.beans.factory.support.AbstractBeanDefinition
|
getBeanDefinition()
@return The Spring bean definition instance |
java.lang.String
|
getName()
@return The name of the bean |
java.lang.Object
|
getPropertyValue(java.lang.String name)
Returns the value of the given property or throws a MissingPropertyException. |
boolean
|
hasProperty(java.lang.String name)
Returns true if the bean config has the name property set. |
boolean
|
isSingleton()
@return True if the bean is singleton |
BeanConfiguration
|
setAbstract(boolean isAbstract)
Sets the BeanConfiguration as an Abstract bean definition |
BeanConfiguration
|
setAutowire(java.lang.String type)
Sets the autowire type, either "byType" or "byName" |
void
|
setBeanDefinition(org.springframework.beans.factory.config.BeanDefinition definition)
|
BeanConfiguration
|
setDependsOn(java.lang.String[] dependsOn)
Sets the names of the beans this bean configuration depends on |
BeanConfiguration
|
setDestroyMethod(java.lang.String methodName)
Sets the name of the method to call when destroying the bean. |
BeanConfiguration
|
setFactoryBean(java.lang.String beanName)
@param beanName |
BeanConfiguration
|
setFactoryMethod(java.lang.String methodName)
@param methodName |
void
|
setName(java.lang.String beanName)
Sets the name of the bean in the app ctx. |
void
|
setParent(java.lang.Object name)
Sets the name of the parent bean. |
void
|
setPropertyValue(java.lang.String property, java.lang.Object newValue)
Sets a property value on the bean configuration |
Field Detail |
---|
public java.lang.String AUTOWIRE_BY_NAME
public java.lang.String AUTOWIRE_BY_TYPE
Method Detail |
---|
public BeanConfiguration addProperty(java.lang.String propertyName, java.lang.Object propertyValue)
propertyName
- The name of the propertypropertyValue
- The value of the property
public void addQualifier(java.lang.String name)
public void addQualifier(java.lang.Class qualifierClass, java.lang.String name)
public org.springframework.beans.factory.support.AbstractBeanDefinition getBeanDefinition()
public java.lang.String getName()
public java.lang.Object getPropertyValue(java.lang.String name)
name
- The name of the property
public boolean hasProperty(java.lang.String name)
name
- The name of the property
public boolean isSingleton()
public BeanConfiguration setAbstract(boolean isAbstract)
isAbstract
- Whether its abstract or not
public BeanConfiguration setAutowire(java.lang.String type)
type
- The type
public void setBeanDefinition(org.springframework.beans.factory.config.BeanDefinition definition)
public BeanConfiguration setDependsOn(java.lang.String[] dependsOn)
dependsOn
- Bean names it depends on
public BeanConfiguration setDestroyMethod(java.lang.String methodName)
methodName
- The method name
public BeanConfiguration setFactoryBean(java.lang.String beanName)
public BeanConfiguration setFactoryMethod(java.lang.String methodName)
public void setName(java.lang.String beanName)
beanName
- The bean name
public void setParent(java.lang.Object name)
name
- Either a string which is the name of the bean, a RuntimeBeanReference or a BeanConfiguration
public void setPropertyValue(java.lang.String property, java.lang.Object newValue)
property
- The name of the propertynewValue
- The value
Groovy Documentation