public class WebApplicationContextAdapter extends Object implements org.springframework.web.context.WebApplicationContext
CONTEXT_ATTRIBUTES_BEAN_NAME, CONTEXT_PARAMETERS_BEAN_NAME, ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, SCOPE_APPLICATION, SCOPE_REQUEST, SCOPE_SESSION, SERVLET_CONTEXT_BEAN_NAME
Constructor and Description |
---|
WebApplicationContextAdapter(org.springframework.context.ApplicationContext wrapped,
javax.servlet.ServletContext servletContext) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsBean(String name) |
boolean |
containsBeanDefinition(String beanName) |
boolean |
containsLocalBean(String name) |
<A extends Annotation> |
findAnnotationOnBean(String beanName,
Class<A> annotationType) |
<A extends Annotation> |
findAnnotationOnBean(String beanName,
Class<A> annotationType,
boolean allowFactoryBeanInit) |
String[] |
getAliases(String name) |
String |
getApplicationName() |
org.springframework.beans.factory.config.AutowireCapableBeanFactory |
getAutowireCapableBeanFactory() |
<T> T |
getBean(Class<T> requiredType) |
<T> T |
getBean(Class<T> requiredType,
Object... args) |
Object |
getBean(String name) |
<T> T |
getBean(String name,
Class<T> requiredType) |
Object |
getBean(String name,
Object... args) |
int |
getBeanDefinitionCount() |
String[] |
getBeanDefinitionNames() |
String[] |
getBeanNamesForAnnotation(Class<? extends Annotation> annotationType) |
String[] |
getBeanNamesForType(Class<?> type) |
String[] |
getBeanNamesForType(Class<?> type,
boolean includeNonSingletons,
boolean allowEagerInit) |
String[] |
getBeanNamesForType(org.springframework.core.ResolvableType type) |
String[] |
getBeanNamesForType(org.springframework.core.ResolvableType resolvableType,
boolean includeNonSingletons,
boolean allowEagerInit) |
<T> org.springframework.beans.factory.ObjectProvider<T> |
getBeanProvider(Class<T> aClass) |
<T> org.springframework.beans.factory.ObjectProvider<T> |
getBeanProvider(Class<T> aClass,
boolean b) |
<T> org.springframework.beans.factory.ObjectProvider<T> |
getBeanProvider(org.springframework.core.ResolvableType resolvableType) |
<T> org.springframework.beans.factory.ObjectProvider<T> |
getBeanProvider(org.springframework.core.ResolvableType resolvableType,
boolean b) |
<T> Map<String,T> |
getBeansOfType(Class<T> type) |
<T> Map<String,T> |
getBeansOfType(Class<T> type,
boolean includeNonSingletons,
boolean allowEagerInit) |
Map<String,Object> |
getBeansWithAnnotation(Class<? extends Annotation> annotationType) |
ClassLoader |
getClassLoader() |
String |
getDisplayName() |
org.springframework.core.env.Environment |
getEnvironment() |
String |
getId() |
String |
getMessage(org.springframework.context.MessageSourceResolvable resolvable,
Locale locale) |
String |
getMessage(String code,
Object[] args,
Locale locale) |
String |
getMessage(String code,
Object[] args,
String defaultMessage,
Locale locale) |
org.springframework.context.ApplicationContext |
getParent() |
org.springframework.beans.factory.BeanFactory |
getParentBeanFactory() |
org.springframework.core.io.Resource |
getResource(String location) |
org.springframework.core.io.Resource[] |
getResources(String locationPattern) |
javax.servlet.ServletContext |
getServletContext() |
long |
getStartupDate() |
Class<?> |
getType(String name) |
Class<?> |
getType(String name,
boolean allowFactoryBeanInit) |
boolean |
isPrototype(String name) |
boolean |
isSingleton(String name) |
boolean |
isTypeMatch(String name,
Class<?> typeToMatch) |
boolean |
isTypeMatch(String name,
org.springframework.core.ResolvableType typeToMatch) |
void |
publishEvent(org.springframework.context.ApplicationEvent event) |
void |
publishEvent(Object event) |
public WebApplicationContextAdapter(org.springframework.context.ApplicationContext wrapped, javax.servlet.ServletContext servletContext)
public String getId()
getId
in interface org.springframework.context.ApplicationContext
@Nonnull public String getApplicationName()
getApplicationName
in interface org.springframework.context.ApplicationContext
@Nonnull public String getDisplayName()
getDisplayName
in interface org.springframework.context.ApplicationContext
public long getStartupDate()
getStartupDate
in interface org.springframework.context.ApplicationContext
public org.springframework.context.ApplicationContext getParent()
getParent
in interface org.springframework.context.ApplicationContext
@Nonnull public org.springframework.beans.factory.config.AutowireCapableBeanFactory getAutowireCapableBeanFactory() throws IllegalStateException
getAutowireCapableBeanFactory
in interface org.springframework.context.ApplicationContext
IllegalStateException
@Nonnull public org.springframework.core.env.Environment getEnvironment()
getEnvironment
in interface org.springframework.core.env.EnvironmentCapable
public boolean containsBeanDefinition(@Nonnull String beanName)
containsBeanDefinition
in interface org.springframework.beans.factory.ListableBeanFactory
public int getBeanDefinitionCount()
getBeanDefinitionCount
in interface org.springframework.beans.factory.ListableBeanFactory
@Nonnull public String[] getBeanDefinitionNames()
getBeanDefinitionNames
in interface org.springframework.beans.factory.ListableBeanFactory
@Nonnull public String[] getBeanNamesForType(@Nonnull org.springframework.core.ResolvableType type)
getBeanNamesForType
in interface org.springframework.beans.factory.ListableBeanFactory
@Nonnull public String[] getBeanNamesForType(@Nonnull org.springframework.core.ResolvableType resolvableType, boolean includeNonSingletons, boolean allowEagerInit)
getBeanNamesForType
in interface org.springframework.beans.factory.ListableBeanFactory
@Nonnull public String[] getBeanNamesForType(Class<?> type)
getBeanNamesForType
in interface org.springframework.beans.factory.ListableBeanFactory
@Nonnull public String[] getBeanNamesForType(Class<?> type, boolean includeNonSingletons, boolean allowEagerInit)
getBeanNamesForType
in interface org.springframework.beans.factory.ListableBeanFactory
@Nonnull public <T> Map<String,T> getBeansOfType(Class<T> type) throws org.springframework.beans.BeansException
getBeansOfType
in interface org.springframework.beans.factory.ListableBeanFactory
org.springframework.beans.BeansException
@Nonnull public <T> Map<String,T> getBeansOfType(Class<T> type, boolean includeNonSingletons, boolean allowEagerInit) throws org.springframework.beans.BeansException
getBeansOfType
in interface org.springframework.beans.factory.ListableBeanFactory
org.springframework.beans.BeansException
@Nonnull public String[] getBeanNamesForAnnotation(@Nonnull Class<? extends Annotation> annotationType)
getBeanNamesForAnnotation
in interface org.springframework.beans.factory.ListableBeanFactory
@Nonnull public Map<String,Object> getBeansWithAnnotation(@Nonnull Class<? extends Annotation> annotationType) throws org.springframework.beans.BeansException
getBeansWithAnnotation
in interface org.springframework.beans.factory.ListableBeanFactory
org.springframework.beans.BeansException
public <A extends Annotation> A findAnnotationOnBean(@Nonnull String beanName, @Nonnull Class<A> annotationType) throws org.springframework.beans.factory.NoSuchBeanDefinitionException
findAnnotationOnBean
in interface org.springframework.beans.factory.ListableBeanFactory
org.springframework.beans.factory.NoSuchBeanDefinitionException
public <A extends Annotation> A findAnnotationOnBean(String beanName, Class<A> annotationType, boolean allowFactoryBeanInit) throws org.springframework.beans.factory.NoSuchBeanDefinitionException
findAnnotationOnBean
in interface org.springframework.beans.factory.ListableBeanFactory
org.springframework.beans.factory.NoSuchBeanDefinitionException
@Nonnull public Object getBean(@Nonnull String name) throws org.springframework.beans.BeansException
getBean
in interface org.springframework.beans.factory.BeanFactory
org.springframework.beans.BeansException
@Nonnull public <T> T getBean(@Nonnull String name, @Nonnull Class<T> requiredType) throws org.springframework.beans.BeansException
getBean
in interface org.springframework.beans.factory.BeanFactory
org.springframework.beans.BeansException
@Nonnull public <T> T getBean(@Nonnull Class<T> requiredType) throws org.springframework.beans.BeansException
getBean
in interface org.springframework.beans.factory.BeanFactory
org.springframework.beans.BeansException
@Nonnull public Object getBean(@Nonnull String name, @Nonnull Object... args) throws org.springframework.beans.BeansException
getBean
in interface org.springframework.beans.factory.BeanFactory
org.springframework.beans.BeansException
@Nonnull public <T> T getBean(@Nonnull Class<T> requiredType, @Nonnull Object... args) throws org.springframework.beans.BeansException
getBean
in interface org.springframework.beans.factory.BeanFactory
org.springframework.beans.BeansException
@Nonnull public <T> org.springframework.beans.factory.ObjectProvider<T> getBeanProvider(@Nonnull Class<T> aClass)
getBeanProvider
in interface org.springframework.beans.factory.BeanFactory
@Nonnull public <T> org.springframework.beans.factory.ObjectProvider<T> getBeanProvider(@Nonnull org.springframework.core.ResolvableType resolvableType)
getBeanProvider
in interface org.springframework.beans.factory.BeanFactory
public boolean containsBean(@Nonnull String name)
containsBean
in interface org.springframework.beans.factory.BeanFactory
public boolean isSingleton(@Nonnull String name) throws org.springframework.beans.factory.NoSuchBeanDefinitionException
isSingleton
in interface org.springframework.beans.factory.BeanFactory
org.springframework.beans.factory.NoSuchBeanDefinitionException
public boolean isPrototype(@Nonnull String name) throws org.springframework.beans.factory.NoSuchBeanDefinitionException
isPrototype
in interface org.springframework.beans.factory.BeanFactory
org.springframework.beans.factory.NoSuchBeanDefinitionException
public boolean isTypeMatch(@Nonnull String name, @Nonnull org.springframework.core.ResolvableType typeToMatch) throws org.springframework.beans.factory.NoSuchBeanDefinitionException
isTypeMatch
in interface org.springframework.beans.factory.BeanFactory
org.springframework.beans.factory.NoSuchBeanDefinitionException
public boolean isTypeMatch(@Nonnull String name, @Nonnull Class<?> typeToMatch) throws org.springframework.beans.factory.NoSuchBeanDefinitionException
isTypeMatch
in interface org.springframework.beans.factory.BeanFactory
org.springframework.beans.factory.NoSuchBeanDefinitionException
public Class<?> getType(@Nonnull String name) throws org.springframework.beans.factory.NoSuchBeanDefinitionException
getType
in interface org.springframework.beans.factory.BeanFactory
org.springframework.beans.factory.NoSuchBeanDefinitionException
public Class<?> getType(@Nonnull String name, boolean allowFactoryBeanInit) throws org.springframework.beans.factory.NoSuchBeanDefinitionException
getType
in interface org.springframework.beans.factory.BeanFactory
org.springframework.beans.factory.NoSuchBeanDefinitionException
@Nonnull public String[] getAliases(@Nonnull String name)
getAliases
in interface org.springframework.beans.factory.BeanFactory
public org.springframework.beans.factory.BeanFactory getParentBeanFactory()
getParentBeanFactory
in interface org.springframework.beans.factory.HierarchicalBeanFactory
public boolean containsLocalBean(@Nonnull String name)
containsLocalBean
in interface org.springframework.beans.factory.HierarchicalBeanFactory
public String getMessage(@Nonnull String code, Object[] args, String defaultMessage, @Nonnull Locale locale)
getMessage
in interface org.springframework.context.MessageSource
@Nonnull public String getMessage(@Nonnull String code, Object[] args, @Nonnull Locale locale) throws org.springframework.context.NoSuchMessageException
getMessage
in interface org.springframework.context.MessageSource
org.springframework.context.NoSuchMessageException
@Nonnull public String getMessage(@Nonnull org.springframework.context.MessageSourceResolvable resolvable, @Nonnull Locale locale) throws org.springframework.context.NoSuchMessageException
getMessage
in interface org.springframework.context.MessageSource
org.springframework.context.NoSuchMessageException
public void publishEvent(@Nonnull org.springframework.context.ApplicationEvent event)
publishEvent
in interface org.springframework.context.ApplicationEventPublisher
public void publishEvent(@Nonnull Object event)
publishEvent
in interface org.springframework.context.ApplicationEventPublisher
@Nonnull public org.springframework.core.io.Resource[] getResources(@Nonnull String locationPattern) throws IOException
getResources
in interface org.springframework.core.io.support.ResourcePatternResolver
IOException
@Nonnull public org.springframework.core.io.Resource getResource(@Nonnull String location)
getResource
in interface org.springframework.core.io.ResourceLoader
public ClassLoader getClassLoader()
getClassLoader
in interface org.springframework.core.io.ResourceLoader
public javax.servlet.ServletContext getServletContext()
getServletContext
in interface org.springframework.web.context.WebApplicationContext
@NonNull public <T> org.springframework.beans.factory.ObjectProvider<T> getBeanProvider(@NonNull Class<T> aClass, boolean b)
getBeanProvider
in interface org.springframework.beans.factory.ListableBeanFactory
@NonNull public <T> org.springframework.beans.factory.ObjectProvider<T> getBeanProvider(@NonNull org.springframework.core.ResolvableType resolvableType, boolean b)
getBeanProvider
in interface org.springframework.beans.factory.ListableBeanFactory
Copyright © 2024. All rights reserved.