类 StaticApplicationContext
java.lang.Object
cn.taketoday.core.io.DefaultResourceLoader
cn.taketoday.context.support.AbstractApplicationContext
cn.taketoday.context.support.GenericApplicationContext
cn.taketoday.context.support.StaticApplicationContext
- 所有已实现的接口:
BeanFactory,HierarchicalBeanFactory,BeanDefinitionRegistry,DependencyInjectorProvider,ApplicationContext,ApplicationEventPublisher,ConfigurableApplicationContext,Lifecycle,MessageSource,cn.taketoday.core.AliasRegistry,cn.taketoday.core.env.EnvironmentCapable,cn.taketoday.core.io.PatternResourceLoader,cn.taketoday.core.io.ResourceLoader,Closeable,AutoCloseable
ApplicationContext implementation
which supports programmatic registration of beans and messages,
rather than reading bean definitions from external configuration sources.
Mainly useful for testing.- 作者:
- Rod Johnson, Juergen Hoeller
- 另请参阅:
-
GenericApplicationContext.registerSingleton(java.lang.String, java.lang.Object)GenericApplicationContext.registerPrototype(java.lang.String, java.lang.Class<?>)GenericApplicationContext.registerBeanDefinition(java.lang.String, cn.taketoday.beans.factory.config.BeanDefinition)AbstractApplicationContext.refresh()
-
嵌套类概要
从类继承的嵌套类/接口 cn.taketoday.core.io.DefaultResourceLoader
cn.taketoday.core.io.DefaultResourceLoader.ClassPathContextResource从接口继承的嵌套类/接口 cn.taketoday.context.ApplicationContext
ApplicationContext.State -
字段概要
从类继承的字段 cn.taketoday.context.support.GenericApplicationContext
beanFactory从类继承的字段 cn.taketoday.context.support.AbstractApplicationContext
APPLICATION_EVENT_MULTICASTER_BEAN_NAME, LIFECYCLE_PROCESSOR_BEAN_NAME, log, MESSAGE_SOURCE_BEAN_NAME从接口继承的字段 cn.taketoday.context.ApplicationContext
APPLICATION_NAME从接口继承的字段 cn.taketoday.beans.factory.BeanFactory
FACTORY_BEAN_PREFIX从接口继承的字段 cn.taketoday.context.ConfigurableApplicationContext
CONFIG_LOCATION_DELIMITERS, CONVERSION_SERVICE_BEAN_NAME, LOAD_TIME_WEAVER_BEAN_NAME, SHUTDOWN_HOOK_THREAD_NAME从接口继承的字段 cn.taketoday.core.io.PatternResourceLoader
CLASSPATH_ALL_URL_PREFIX从接口继承的字段 cn.taketoday.core.io.ResourceLoader
CLASSPATH_URL_PREFIX -
构造器概要
构造器构造器说明Create a new StaticApplicationContext.Create a new StaticApplicationContext with the given parent. -
方法概要
修饰符和类型方法说明voidaddMessage(String code, Locale locale, String defaultMessage) Associate the given message with the given code.protected voidOverridden to turn it into a no-op, to be more lenient towards test cases.final StaticMessageSourceReturn the internal StaticMessageSource used by this context.从类继承的方法 cn.taketoday.context.support.GenericApplicationContext
cancelRefresh, closeBeanFactory, containsBeanDefinition, containsBeanDefinition, containsBeanDefinition, createBootstrapContext, getAliasList, getAutowireCapableBeanFactory, getBeanDefinition, getBeanDefinition, getBeanDefinitionCount, getBeanDefinitionNames, getBeanFactory, getClassLoader, getResource, getResources, isAlias, isAllowBeanDefinitionOverriding, isBeanNameInUse, refreshBeanFactory, registerAlias, registerBean, registerBean, registerBean, registerBean, registerBean, registerBean, registerBeanDefinition, registerPrototype, registerPrototype, registerSingleton, registerSingleton, registerSingleton, registerSingleton, removeAlias, removeBeanDefinition, scan, setAllowBeanDefinitionOverriding, setAllowCircularReferences, setClassLoader, setParent, setResourceLoader从类继承的方法 cn.taketoday.context.support.AbstractApplicationContext
addApplicationListener, addBeanFactoryPostProcessor, addFactoryPostProcessors, applyState, close, containsBean, containsLocalBean, createEnvironment, destroyBeans, doClose, findAnnotationOnBean, findAnnotationOnBean, findSynthesizedAnnotation, finishBeanFactoryInitialization, finishRefresh, formatStartupDate, getAliases, getAnnotatedBeans, getApplicationEventMulticaster, getApplicationListeners, getApplicationName, getBean, getBean, getBean, getBean, getBean, getBeanDefinitions, getBeanNamesForAnnotation, getBeanNamesForType, getBeanNamesForType, getBeanNamesForType, getBeanNamesForType, getBeans, getBeansOfType, getBeansOfType, getBeansOfType, getBeansWithAnnotation, getBeansWithAnnotation, getBootstrapContext, getDisplayName, getEnvironment, getExpressionEvaluator, getFactoryPostProcessors, getId, getInjector, getInternalParentBeanFactory, getInternalParentMessageSource, getLifecycleProcessor, getMessage, getMessage, getMessage, getObjectSupplier, getObjectSupplier, getObjectSupplier, getObjectSupplier, getParent, getParentBeanFactory, getPatternResourceLoader, getStartupDate, getState, getType, getType, hasStarted, initApplicationEventMulticaster, initLifecycleProcessor, initMessageSource, initPropertySources, invokeBeanFactoryPostProcessors, isActive, isPrototype, isRunning, isSingleton, isTypeMatch, isTypeMatch, obtainBootstrapContext, obtainFreshBeanFactory, onClose, onRefresh, postProcessBeanFactory, prepareBeanFactory, prepareRefresh, publishEvent, publishEvent, refresh, registerApplicationListeners, registerBeanPostProcessors, registerFrameworkComponents, registerShutdownHook, removeApplicationListener, resetCommonCaches, setBootstrapContext, setDisplayName, setEnvironment, setId, setLifecycleProcessor, start, stop, toString, unwrapFactory从类继承的方法 cn.taketoday.core.io.DefaultResourceLoader
addProtocolResolver, clearResourceCaches, getProtocolResolvers, getResourceByPath, getResourceCache从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait从接口继承的方法 cn.taketoday.core.AliasRegistry
getAliases从接口继承的方法 cn.taketoday.beans.factory.support.BeanDefinitionRegistry
containsBeanDefinition, getBeanDefinitions从接口继承的方法 cn.taketoday.beans.factory.BeanFactory
getBeanNamesForType, unwrap从接口继承的方法 cn.taketoday.context.ConfigurableApplicationContext
addProtocolResolver从接口继承的方法 cn.taketoday.core.io.PatternResourceLoader
getResourcesArray
-
构造器详细资料
-
StaticApplicationContext
Create a new StaticApplicationContext.- 抛出:
BeansException- 另请参阅:
-
GenericApplicationContext.registerSingleton(java.lang.String, java.lang.Object)GenericApplicationContext.registerPrototype(java.lang.String, java.lang.Class<?>)GenericApplicationContext.registerBeanDefinition(java.lang.String, cn.taketoday.beans.factory.config.BeanDefinition)AbstractApplicationContext.refresh()
-
StaticApplicationContext
Create a new StaticApplicationContext with the given parent.- 抛出:
BeansException- 另请参阅:
-
GenericApplicationContext.registerSingleton(java.lang.String, java.lang.Object)GenericApplicationContext.registerPrototype(java.lang.String, java.lang.Class<?>)GenericApplicationContext.registerBeanDefinition(java.lang.String, cn.taketoday.beans.factory.config.BeanDefinition)AbstractApplicationContext.refresh()
-
-
方法详细资料
-
assertBeanFactoryActive
protected void assertBeanFactoryActive()Overridden to turn it into a no-op, to be more lenient towards test cases. -
getStaticMessageSource
Return the internal StaticMessageSource used by this context. Can be used to register messages on it. -
addMessage
Associate the given message with the given code.- 参数:
code- lookup codelocale- the locale message should be found withindefaultMessage- message associated with this lookup code- 另请参阅:
-