public class DefaultRuntimeSpringConfiguration extends java.lang.Object
A programmable runtime Spring configuration that allows a spring ApplicationContext to be constructed at runtime. Credit must go to Solomon Duskis and the article: http://jroller.com/page/Solomon?entry=programmatic_configuration_in_spring
Modifiers | Name | Description |
---|---|---|
protected java.util.Map<java.lang.String, java.util.List<java.lang.String>> |
aliases |
|
protected org.springframework.beans.factory.ListableBeanFactory |
beanFactory |
|
protected java.lang.ClassLoader |
classLoader |
|
protected org.springframework.context.support.GenericApplicationContext |
context |
|
protected org.springframework.context.ApplicationContext |
parent |
Constructor and description |
---|
DefaultRuntimeSpringConfiguration
() |
DefaultRuntimeSpringConfiguration
(org.springframework.context.ApplicationContext parent) |
DefaultRuntimeSpringConfiguration
(org.springframework.context.ApplicationContext parent, java.lang.ClassLoader cl) |
Type | Name and description |
---|---|
BeanConfiguration |
addAbstractBean(java.lang.String name) |
void |
addAlias(java.lang.String alias, java.lang.String beanName) |
void |
addBeanConfiguration(java.lang.String beanName, BeanConfiguration beanConfiguration) |
void |
addBeanDefinition(java.lang.String name, org.springframework.beans.factory.config.BeanDefinition bd) |
BeanConfiguration |
addPrototypeBean(java.lang.String name, java.lang.Class clazz) |
BeanConfiguration |
addPrototypeBean(java.lang.String name) |
BeanConfiguration |
addSingletonBean(java.lang.String name, java.lang.Class clazz) |
BeanConfiguration |
addSingletonBean(java.lang.String name) |
BeanConfiguration |
addSingletonBean(java.lang.String name, java.lang.Class clazz, java.util.Collection args) |
boolean |
containsBean(java.lang.String name) |
protected org.springframework.context.support.GenericApplicationContext |
createApplicationContext(org.springframework.context.ApplicationContext parentCtx) Creates the ApplicationContext instance. |
org.springframework.beans.factory.support.AbstractBeanDefinition |
createBeanDefinition(java.lang.String name) |
BeanConfiguration |
createPrototypeBean(java.lang.String name) |
BeanConfiguration |
createSingletonBean(java.lang.Class clazz) |
BeanConfiguration |
createSingletonBean(java.lang.Class clazz, java.util.Collection constructorArguments) |
BeanConfiguration |
createSingletonBean(java.lang.String name) |
org.springframework.context.ApplicationContext |
getApplicationContext() |
BeanConfiguration |
getBeanConfig(java.lang.String name) |
org.springframework.beans.factory.config.BeanDefinition |
getBeanDefinition(java.lang.String beanName) |
java.util.List<java.lang.String> |
getBeanNames() |
org.springframework.context.ApplicationContext |
getUnrefreshedApplicationContext() |
protected void |
initialiseApplicationContext() Initialises the ApplicationContext instance. |
void |
registerBeansWithConfig(RuntimeSpringConfiguration targetSpringConfig) |
void |
registerBeansWithContext(org.springframework.context.support.GenericApplicationContext applicationContext) |
void |
registerBeansWithRegistry(org.springframework.beans.factory.support.BeanDefinitionRegistry registry) |
void |
registerPostProcessor(org.springframework.beans.factory.config.BeanFactoryPostProcessor processor) |
void |
setBeanFactory(org.springframework.beans.factory.ListableBeanFactory beanFactory) |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Creates the ApplicationContext instance. Subclasses can override to customise the used ApplicationContext
parentCtx
- The parent ApplicationContext instance. Can be null.Initialises the ApplicationContext instance.