Spring Boot源码01-AnnotationConfigServletWebServerApplicationContext的子子孙孙

层级结构

class AnnotationConfigServletWebServerApplicationContext extends ServletWebServerApplicationContext implements AnnotationConfigRegistry 
    class ServletWebServerApplicationContext extends GenericWebApplicationContext implements ConfigurableWebServerApplicationContext
        class GenericWebApplicationContext extends GenericApplicationContext implements ConfigurableWebApplicationContext, ThemeSource
            GenericApplicationContext extends AbstractApplicationContext implements BeanDefinitionRegistry
                abstract class AbstractApplicationContext extends DefaultResourceLoader
                    class DefaultResourceLoader implements ResourceLoader
                        interface ResourceLoader
                interface BeanDefinitionRegistry extends AliasRegistry
                    interface AliasRegistry                 
            interface ConfigurableWebApplicationContext extends WebApplicationContext, ConfigurableApplicationContext
                interface WebApplicationContext extends ApplicationContext
                    interface ApplicationContext extends EnvironmentCapable, ListableBeanFactory, HierarchicalBeanFactory,MessageSource, ApplicationEventPublisher, ResourcePatternResolver
                        interface EnvironmentCapable
                        interface ListableBeanFactory extends BeanFactory
                            interface BeanFactory
                        interface HierarchicalBeanFactory extends BeanFactory
                        interface MessageSource
                        @FunctionalInterface
                        public interface ApplicationEventPublisher                  
                        interface ResourcePatternResolver extends ResourceLoader
                interface ConfigurableApplicationContext extends ApplicationContext, Lifecycle, Closeable
                    interface Lifecycle
                    interface Closeable extends AutoCloseable
                        interface AutoCloseable                     
            interface ThemeSource           
        interface ConfigurableWebServerApplicationContext extends ConfigurableApplicationContext, WebServerApplicationContext       
            interface WebServerApplicationContext extends ApplicationContext
    interface AnnotationConfigRegistry

方法归属

interface ConfigurableWebServerApplicationContext extends ConfigurableApplicationContext, WebServerApplicationContext {
        void setServerNamespace(String serverNamespace);

    interface ConfigurableApplicationContext extends ApplicationContext, Lifecycle, Closeable
        void setId(String id);
        void setParent(@Nullable ApplicationContext parent);
        void setEnvironment(ConfigurableEnvironment environment);
        void addBeanFactoryPostProcessor(BeanFactoryPostProcessor postProcessor);
        void addApplicationListener(ApplicationListener<?> listener);
        void addProtocolResolver(ProtocolResolver resolver);
        void refresh() throws BeansException, IllegalStateException;
        void registerShutdownHook();
        boolean isActive();
        ConfigurableListableBeanFactory getBeanFactory() throws IllegalStateException;


    interface WebServerApplicationContext extends ApplicationContext 
        WebServer getWebServer();
        String getServerNamespace();

    interface ThemeSource   
        @Nullable
        Theme getTheme(String themeName);

    abstract class AbstractApplicationContext extends DefaultResourceLoader
        public void setDisplayName(String displayName) 
        public AbstractApplicationContext() 
        public AbstractApplicationContext(@Nullable ApplicationContext parent)

    interface ConfigurableWebServerApplicationContext extends ConfigurableApplicationContext, WebServerApplicationContext
        void setServerNamespace(String serverNamespace);


    interface ApplicationContext extends EnvironmentCapable, ListableBeanFactory, HierarchicalBeanFactory,MessageSource, ApplicationEventPublisher, ResourcePatternResolver
        @Nullable
        String getId();
        long getStartupDate();
        @Nullable
        ApplicationContext getParent();
        AutowireCapableBeanFactory getAutowireCapableBeanFactory() throws IllegalStateException;

    interface EnvironmentCapable
        Environment getEnvironment();

    interface ListableBeanFactory extends BeanFactory
        interface BeanFactory

    interface ResourceLoader 
        Resource getResource(String location);
        @Nullable
        ClassLoader getClassLoader();

    interface ResourcePatternResolver extends ResourceLoader
        Resource[] getResources(String locationPattern) throws IOException;

    interface WebApplicationContext extends ApplicationContext
        void setId(String id);
        void setParent(@Nullable ApplicationContext parent);
        void setEnvironment(ConfigurableEnvironment environment);
        @Override
        ConfigurableEnvironment getEnvironment();
        void addBeanFactoryPostProcessor(BeanFactoryPostProcessor postProcessor);
        void addApplicationListener(ApplicationListener<?> listener);
        void addProtocolResolver(ProtocolResolver resolver);
        void refresh() throws BeansException, IllegalStateException;
        void registerShutdownHook();
        @Override
        void close();
        boolean isActive();
        ConfigurableListableBeanFactory getBeanFactory() throws IllegalStateException;

    interface ListableBeanFactory extends BeanFactory
        boolean containsBeanDefinition(String beanName);
        beans defined in the factory
        int getBeanDefinitionCount();
        String[] getBeanDefinitionNames();
        String[] getBeanNamesForType(ResolvableType type);
        String[] getBeanNamesForType(@Nullable Class<?> type);
        String[] getBeanNamesForType(@Nullable Class<?> type, boolean includeNonSingletons, boolean allowEagerInit);
        <T> Map<String, T> getBeansOfType(@Nullable Class<T> type) throws BeansException;
        <T> Map<String, T> getBeansOfType(@Nullable Class<T> type, boolean includeNonSingletons, boolean allowEagerInit)
                    throws BeansException;
        String[] getBeanNamesForAnnotation(Class<? extends Annotation> annotationType);
        Map<String, Object> getBeansWithAnnotation(Class<? extends Annotation> annotationType) throws BeansException;
        @Nullable
        <A extends Annotation> A findAnnotationOnBean(String beanName, Class<A> annotationType)
                    throws NoSuchBeanDefinitionException;

    interface BeanFactory
        Object getBean(String name) throws BeansException;
        <T> T getBean(String name, @Nullable Class<T> requiredType) throws BeansException;
        Object getBean(String name, Object... args) throws BeansException;
        <T> T getBean(Class<T> requiredType) throws BeansException;
        <T> T getBean(Class<T> requiredType, Object... args) throws BeansException;
        boolean containsBean(String name);
        boolean isSingleton(String name) throws NoSuchBeanDefinitionException;
        boolean isPrototype(String name) throws NoSuchBeanDefinitionException;
        boolean isTypeMatch(String name, ResolvableType typeToMatch) throws NoSuchBeanDefinitionException;
        boolean isTypeMatch(String name, @Nullable Class<?> typeToMatch) throws NoSuchBeanDefinitionException;
        @Nullable
        Class<?> getType(String name) throws NoSuchBeanDefinitionException;
        String[] getAliases(String name);

    interface HierarchicalBeanFactory extends BeanFactory
        @Nullable
        BeanFactory getParentBeanFactory();
        boolean containsLocalBean(String name);

    interface MessageSource
        @Nullable
        String getMessage(String code, @Nullable Object[] args, @Nullable String defaultMessage, Locale locale);
        String getMessage(String code, @Nullable Object[] args, Locale locale) throws NoSuchMessageException;
        String getMessage(MessageSourceResolvable resolvable, Locale locale) throws NoSuchMessageException;

    @FunctionalInterface
    public interface ApplicationEventPublisher
        default void publishEvent(ApplicationEvent event) {
            publishEvent((Object) event);
        }
        void publishEvent(Object event);

    interface AnnotationConfigRegistry
        void register(Class<?>... annotatedClasses);
        void scan(String... basePackages);
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值