org.springframework.context.support
Class StaticApplicationContext
org.springframework.context.support.AbstractApplicationContext
|
+--org.springframework.context.support.StaticApplicationContext
- Direct Known Subclasses:
- StaticUiApplicationContext
- public class StaticApplicationContext
- extends AbstractApplicationContext
ApplicationContext to allow concrete registration of Java objects
in code, rather than from external configuration sources.
Mainly useful for testing.
- Author:
- Rod Johnson
| Methods inherited from class org.springframework.context.support.AbstractApplicationContext |
close, containsBean, containsBeanDefinition, getAliases, getBean, getBean, getBeanDefinitionCount, getBeanDefinitionNames, getBeanDefinitionNames, getBeansOfType, getDisplayName, getMessage, getMessage, getMessage, getParent, getParentBeanFactory, getResource, getStartupDate, isSingleton, publishEvent, refresh, setParent, toString |
StaticApplicationContext
public StaticApplicationContext()
throws org.springframework.beans.BeansException
- Create new StaticApplicationContext.
StaticApplicationContext
public StaticApplicationContext(ApplicationContext parent)
throws org.springframework.beans.BeansException
- Create new StaticApplicationContext with the given parent.
- Parameters:
- parent - the parent application context
addMessage
public void addMessage(String code, Locale locale, String defaultMessage)
- Associate the given message with the given code.
- Parameters:
- code - lookup code
- locale - locale message should be found within
- defaultMessage - message associated with this lookup code
getBeanFactory
public ConfigurableListableBeanFactory getBeanFactory()
- Return underlying bean factory for super class.
getDefaultListableBeanFactory
public DefaultListableBeanFactory getDefaultListableBeanFactory()
- Return the underlying bean factory of this context.
registerPrototype
public void registerPrototype(String name, Class clazz, MutablePropertyValues pvs)
throws org.springframework.beans.BeansException
- Register a prototype bean with the default bean factory.
registerSingleton
public void registerSingleton(String name, Class clazz, MutablePropertyValues pvs)
throws org.springframework.beans.BeansException
- Register a singleton bean with the default bean factory.
to Class org.springframework.beans.factory.support.DefaultListableBeanFactory