Class ParentDelegatingWebApplicationContext

  • All Implemented Interfaces:
    org.springframework.beans.factory.BeanFactory, org.springframework.beans.factory.HierarchicalBeanFactory, org.springframework.beans.factory.ListableBeanFactory, org.springframework.context.ApplicationContext, org.springframework.context.ApplicationEventPublisher, org.springframework.context.MessageSource, org.springframework.core.env.EnvironmentCapable, org.springframework.core.io.ResourceLoader, org.springframework.core.io.support.ResourcePatternResolver, org.springframework.web.context.WebApplicationContext

    public final class ParentDelegatingWebApplicationContext
    extends Object
    implements org.springframework.web.context.WebApplicationContext
    WebApplicationContext implementation that delegates method calls to parent ApplicationContext.
    • Constructor Detail

      • ParentDelegatingWebApplicationContext

        public ParentDelegatingWebApplicationContext​(org.springframework.context.ApplicationContext applicationContext)
    • Method Detail

      • getResource

        public org.springframework.core.io.Resource getResource​(String location)
        Specified by:
        getResource in interface org.springframework.core.io.ResourceLoader
      • getClassLoader

        public ClassLoader getClassLoader()
        Specified by:
        getClassLoader in interface org.springframework.core.io.ResourceLoader
      • getResources

        public org.springframework.core.io.Resource[] getResources​(String locationPattern)
                                                            throws IOException
        Specified by:
        getResources in interface org.springframework.core.io.support.ResourcePatternResolver
        Throws:
        IOException
      • publishEvent

        public void publishEvent​(org.springframework.context.ApplicationEvent event)
        Specified by:
        publishEvent in interface org.springframework.context.ApplicationEventPublisher
      • publishEvent

        public void publishEvent​(Object event)
        Specified by:
        publishEvent in interface org.springframework.context.ApplicationEventPublisher
      • getMessage

        public String getMessage​(String code,
                                 Object[] args,
                                 String defaultMessage,
                                 Locale locale)
        Specified by:
        getMessage in interface org.springframework.context.MessageSource
      • getMessage

        public String getMessage​(String code,
                                 Object[] args,
                                 Locale locale)
                          throws org.springframework.context.NoSuchMessageException
        Specified by:
        getMessage in interface org.springframework.context.MessageSource
        Throws:
        org.springframework.context.NoSuchMessageException
      • getMessage

        public String getMessage​(org.springframework.context.MessageSourceResolvable resolvable,
                                 Locale locale)
                          throws org.springframework.context.NoSuchMessageException
        Specified by:
        getMessage in interface org.springframework.context.MessageSource
        Throws:
        org.springframework.context.NoSuchMessageException
      • getParentBeanFactory

        public org.springframework.beans.factory.BeanFactory getParentBeanFactory()
        Specified by:
        getParentBeanFactory in interface org.springframework.beans.factory.HierarchicalBeanFactory
      • containsLocalBean

        public boolean containsLocalBean​(String name)
        Specified by:
        containsLocalBean in interface org.springframework.beans.factory.HierarchicalBeanFactory
      • isSingleton

        public boolean isSingleton​(String name)
                            throws org.springframework.beans.factory.NoSuchBeanDefinitionException
        Specified by:
        isSingleton in interface org.springframework.beans.factory.BeanFactory
        Throws:
        org.springframework.beans.factory.NoSuchBeanDefinitionException
      • isPrototype

        public boolean isPrototype​(String name)
                            throws org.springframework.beans.factory.NoSuchBeanDefinitionException
        Specified by:
        isPrototype in interface org.springframework.beans.factory.BeanFactory
        Throws:
        org.springframework.beans.factory.NoSuchBeanDefinitionException
      • getBean

        public Object getBean​(String name)
                       throws org.springframework.beans.BeansException
        Specified by:
        getBean in interface org.springframework.beans.factory.BeanFactory
        Throws:
        org.springframework.beans.BeansException
      • getAliases

        public String[] getAliases​(String name)
        Specified by:
        getAliases in interface org.springframework.beans.factory.BeanFactory
      • containsBean

        public boolean containsBean​(String name)
        Specified by:
        containsBean in interface org.springframework.beans.factory.BeanFactory
      • getBeanDefinitionNames

        public String[] getBeanDefinitionNames()
        Specified by:
        getBeanDefinitionNames in interface org.springframework.beans.factory.ListableBeanFactory
      • getBeanProvider

        public <T> org.springframework.beans.factory.ObjectProvider<T> getBeanProvider​(Class<T> aClass,
                                                                                       boolean b)
        Specified by:
        getBeanProvider in interface org.springframework.beans.factory.ListableBeanFactory
      • getBeanProvider

        public <T> org.springframework.beans.factory.ObjectProvider<T> getBeanProvider​(org.springframework.core.ResolvableType resolvableType,
                                                                                       boolean b)
        Specified by:
        getBeanProvider in interface org.springframework.beans.factory.ListableBeanFactory
      • getBeanNamesForType

        public String[] getBeanNamesForType​(org.springframework.core.ResolvableType type)
        Specified by:
        getBeanNamesForType in interface org.springframework.beans.factory.ListableBeanFactory
      • getBeanNamesForType

        public String[] getBeanNamesForType​(org.springframework.core.ResolvableType resolvableType,
                                            boolean b,
                                            boolean b1)
        Specified by:
        getBeanNamesForType in interface org.springframework.beans.factory.ListableBeanFactory
      • getBeanDefinitionCount

        public int getBeanDefinitionCount()
        Specified by:
        getBeanDefinitionCount in interface org.springframework.beans.factory.ListableBeanFactory
      • containsBeanDefinition

        public boolean containsBeanDefinition​(String beanName)
        Specified by:
        containsBeanDefinition in interface org.springframework.beans.factory.ListableBeanFactory
      • getStartupDate

        public long getStartupDate()
        Specified by:
        getStartupDate in interface org.springframework.context.ApplicationContext
      • getParent

        public org.springframework.context.ApplicationContext getParent()
        Specified by:
        getParent in interface org.springframework.context.ApplicationContext
      • getId

        public String getId()
        Specified by:
        getId in interface org.springframework.context.ApplicationContext
      • getApplicationName

        public String getApplicationName()
        Specified by:
        getApplicationName in interface org.springframework.context.ApplicationContext
      • getDisplayName

        public String getDisplayName()
        Specified by:
        getDisplayName in interface org.springframework.context.ApplicationContext
      • getAutowireCapableBeanFactory

        public org.springframework.beans.factory.config.AutowireCapableBeanFactory getAutowireCapableBeanFactory()
                                                                                                          throws IllegalStateException
        Specified by:
        getAutowireCapableBeanFactory in interface org.springframework.context.ApplicationContext
        Throws:
        IllegalStateException
      • getBeansOfType

        public <T> Map<String,​T> getBeansOfType​(Class<T> type)
                                               throws org.springframework.beans.BeansException
        Specified by:
        getBeansOfType in interface org.springframework.beans.factory.ListableBeanFactory
        Throws:
        org.springframework.beans.BeansException
      • getBeansOfType

        public <T> Map<String,​T> getBeansOfType​(Class<T> type,
                                                      boolean includeNonSingletons,
                                                      boolean allowEagerInit)
                                               throws org.springframework.beans.BeansException
        Specified by:
        getBeansOfType in interface org.springframework.beans.factory.ListableBeanFactory
        Throws:
        org.springframework.beans.BeansException
      • getBeanNamesForAnnotation

        public String[] getBeanNamesForAnnotation​(Class<? extends Annotation> annotationType)
        Specified by:
        getBeanNamesForAnnotation in interface org.springframework.beans.factory.ListableBeanFactory
      • getBeansWithAnnotation

        public Map<String,​Object> getBeansWithAnnotation​(Class<? extends Annotation> annotationType)
                                                        throws org.springframework.beans.BeansException
        Specified by:
        getBeansWithAnnotation in interface org.springframework.beans.factory.ListableBeanFactory
        Throws:
        org.springframework.beans.BeansException
      • findAnnotationOnBean

        public <A extends Annotation> A findAnnotationOnBean​(String beanName,
                                                             Class<A> annotationType)
        Specified by:
        findAnnotationOnBean in interface org.springframework.beans.factory.ListableBeanFactory
      • findAnnotationOnBean

        public <A extends Annotation> A findAnnotationOnBean​(String beanName,
                                                             Class<A> annotationType,
                                                             boolean allowFactoryBeanInit)
                                                      throws org.springframework.beans.factory.NoSuchBeanDefinitionException
        Specified by:
        findAnnotationOnBean in interface org.springframework.beans.factory.ListableBeanFactory
        Throws:
        org.springframework.beans.factory.NoSuchBeanDefinitionException
      • getBean

        public <T> T getBean​(String name,
                             Class<T> requiredType)
                      throws org.springframework.beans.BeansException
        Specified by:
        getBean in interface org.springframework.beans.factory.BeanFactory
        Throws:
        org.springframework.beans.BeansException
      • getBean

        public <T> T getBean​(Class<T> requiredType)
                      throws org.springframework.beans.BeansException
        Specified by:
        getBean in interface org.springframework.beans.factory.BeanFactory
        Throws:
        org.springframework.beans.BeansException
      • getBeanNamesForType

        public String[] getBeanNamesForType​(Class<?> type)
        Specified by:
        getBeanNamesForType in interface org.springframework.beans.factory.ListableBeanFactory
      • getBeanNamesForType

        public String[] getBeanNamesForType​(Class<?> type,
                                            boolean includeNonSingletons,
                                            boolean allowEagerInit)
        Specified by:
        getBeanNamesForType in interface org.springframework.beans.factory.ListableBeanFactory
      • getBean

        public Object getBean​(String name,
                              Object... args)
                       throws org.springframework.beans.BeansException
        Specified by:
        getBean in interface org.springframework.beans.factory.BeanFactory
        Throws:
        org.springframework.beans.BeansException
      • getBean

        public <T> T getBean​(Class<T> requiredType,
                             Object... args)
                      throws org.springframework.beans.BeansException
        Specified by:
        getBean in interface org.springframework.beans.factory.BeanFactory
        Throws:
        org.springframework.beans.BeansException
      • getBeanProvider

        public <T> org.springframework.beans.factory.ObjectProvider<T> getBeanProvider​(Class<T> aClass)
        Specified by:
        getBeanProvider in interface org.springframework.beans.factory.BeanFactory
      • getBeanProvider

        public <T> org.springframework.beans.factory.ObjectProvider<T> getBeanProvider​(org.springframework.core.ResolvableType resolvableType)
        Specified by:
        getBeanProvider in interface org.springframework.beans.factory.BeanFactory
      • isTypeMatch

        public boolean isTypeMatch​(String name,
                                   Class<?> targetType)
                            throws org.springframework.beans.factory.NoSuchBeanDefinitionException
        Specified by:
        isTypeMatch in interface org.springframework.beans.factory.BeanFactory
        Throws:
        org.springframework.beans.factory.NoSuchBeanDefinitionException
      • isTypeMatch

        public boolean isTypeMatch​(String name,
                                   org.springframework.core.ResolvableType targetType)
                            throws org.springframework.beans.factory.NoSuchBeanDefinitionException
        Specified by:
        isTypeMatch in interface org.springframework.beans.factory.BeanFactory
        Throws:
        org.springframework.beans.factory.NoSuchBeanDefinitionException
      • getType

        public Class<?> getType​(String name)
                         throws org.springframework.beans.factory.NoSuchBeanDefinitionException
        Specified by:
        getType in interface org.springframework.beans.factory.BeanFactory
        Throws:
        org.springframework.beans.factory.NoSuchBeanDefinitionException
      • getType

        public Class<?> getType​(String s,
                                boolean b)
                         throws org.springframework.beans.factory.NoSuchBeanDefinitionException
        Specified by:
        getType in interface org.springframework.beans.factory.BeanFactory
        Throws:
        org.springframework.beans.factory.NoSuchBeanDefinitionException
      • getServletContext

        public javax.servlet.ServletContext getServletContext()
        Specified by:
        getServletContext in interface org.springframework.web.context.WebApplicationContext
      • getEnvironment

        public org.springframework.core.env.Environment getEnvironment()
        Specified by:
        getEnvironment in interface org.springframework.core.env.EnvironmentCapable