spring源码 HierarchicalBeanFactory接口
HierarchicalBeanFactory 表示的是这些 Bean 是有继承关系的,也就是每个Bean 有可能有父 Bean。

/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/ package org.springframework.beans.factory; /**
* Sub-interface implemented by bean factories that can be part
* of a hierarchy.
* 可以被作为分层结构中的一个部分的bean工厂实现
* <p>The corresponding {@code setParentBeanFactory} method for bean
* factories that allow setting the parent in a configurable
* fashion can be found in the ConfigurableBeanFactory interface.
*那些允许以配置的方式设置其父工厂的bean工厂对应的方法setParentBeanFactory可以在接口setParent中找到
* @author Rod Johnson
* @author Juergen Hoeller
* @since 07.07.2003
* @see org.springframework.beans.factory.config.ConfigurableBeanFactory#setParentBeanFactory
*/
public interface HierarchicalBeanFactory extends BeanFactory { /**
* Return the parent bean factory, or {@code null} if there is none.
返回BeanFactory,如果没有则返回Null
*/
BeanFactory getParentBeanFactory(); /**
* Return whether the local bean factory contains a bean of the given name,
* ignoring beans defined in ancestor contexts.
返回当前bean工厂上下文是否存在给定bean名字的bean,忽略定义在其继承层次中的工厂上下文
* <p>This is an alternative to {@code containsBean}, ignoring a bean
* of the given name from an ancestor bean factory.
containsBean方法于此方法是二选一的,都忽略其继承层中的bean定义,只在当前层次中查找
* @param name the name of the bean to query
* @return whether a bean with the given name is defined in the local factory
* @see BeanFactory#containsBean
*/
boolean containsLocalBean(String name); }
spring源码 HierarchicalBeanFactory接口的更多相关文章
- spring源码 AutowireCapableBeanFactory接口
对于想要拥有自动装配能力,并且想把这种能力暴露给外部引用的BeanFactory类需要实现此接口.正常情况下,不要使用此接口应该更倾向于使用BeanFactory或者ListableBeanFacto ...
- spring源码 ListableBeanFactory接口
ListableBeanFactory接口表示这些Bean是可列表的 /* * Copyright 2002-2016 the original author or authors. * * Lice ...
- spring源码系列(二):IOC接口设计分析
这里主要对springIOC接口体系进行简单的概述和分析,具体每个接口详细分析在下面目录: 参考内容: <Spring技术内幕:深入解析 Spring架构与设计原理> 和 <Spri ...
- Spring源码分析——资源访问利器Resource之接口和抽象类分析
从今天开始,一步步走上源码分析的路.刚开始肯定要从简单着手.我们先从Java发展史上最强大的框架——Spring...旗下的资源抽象接口Resource开始吧. 我看了好多分析Spring源码的,每每 ...
- spring源码分析系列 (1) spring拓展接口BeanFactoryPostProcessor、BeanDefinitionRegistryPostProcessor
更多文章点击--spring源码分析系列 主要分析内容: 一.BeanFactoryPostProcessor.BeanDefinitionRegistryPostProcessor简述与demo示例 ...
- spring源码分析系列 (3) spring拓展接口InstantiationAwareBeanPostProcessor
更多文章点击--spring源码分析系列 主要分析内容: 一.InstantiationAwareBeanPostProcessor简述与demo示例 二.InstantiationAwareBean ...
- spring源码分析系列 (2) spring拓展接口BeanPostProcessor
Spring更多分析--spring源码分析系列 主要分析内容: 一.BeanPostProcessor简述与demo示例 二.BeanPostProcessor源码分析:注册时机和触发点 (源码基于 ...
- Spring源码解析 - AbstractBeanFactory 实现接口与父类分析
我们先来看类图吧: 除了BeanFactory这一支的接口,AbstractBeanFactory主要实现了AliasRegistry和SingletonBeanRegistry接口. 这边主要提供了 ...
- Spring源码分析——BeanFactory体系之抽象类、类分析(二)
上一篇分析了BeanFactory体系的2个类,SimpleAliasRegistry和DefaultSingletonBeanRegistry——Spring源码分析——BeanFactory体系之 ...
随机推荐
- 事件驱动的TCP协议Socket通信
事件驱动的TCP协议Socket通信 介绍 常规的Socket通信案例一般都是在某个线程中建立连接,然后用一个while(true)循环判断是或否有数据传输,但是这种方法有局限性. 1.收到消息在处理 ...
- Django链接MySQL,数据库迁移
form表单默认是以get请求提交数据的 http://127.0.0.1:8000/login/?username=admin&password=123 action 1 不写,默认向当前地 ...
- Python作业篇 day03
###一.有变量name = 'aleX leNb',完成如下的操作 name = 'aleX leNb' name1 = ' aleX leNb ' #1.移除name1 变量对应的值两边的空格 , ...
- java并发:interrupt进程终止
interrupt进程终止 interrupt()源码 /** * Interrupts this thread. * * <p> Unless the current thread is ...
- java程序员的就业指导(重点)
想要成为合格的Java程序员或工程师到底需要具备哪些专业技能,面试者在面试之前到底需要准备哪些东西呢?本文陈列的这些内容既可以作为个人简历中的内容,也可以作为面试的时候跟面试官聊的东西,你可以把这些内 ...
- Linux centos7 sed工具介绍
一.sed上 grep工具功能只能实现查找,不能把查找的内容替换. sed本身是一个管道命令,主要是以行为单位进行处理,可以将数据行进行查找.删除.替换字符或字符串.调换字符串位置.直接修改文件内容等 ...
- HHvm Apache 2.4 Nginx建站环境搭建方法安装运行WordPress博客
HHvm Apache 2.4 Nginx建站环境搭建方法安装运行WordPress博客 VPS主机 2014年06月02日 17:20 评论» 文章目录 Debian上安装 Ce ...
- Linux shell 学习随笔2
1.几个重要的快捷键 (1) Tab 命令补齐或文件补齐 vtas@vtas-computer:~$ ca[tab][tab] cal calibrate_ppa canberra-gtk-play ...
- 第3节 sqoop:5、实现数据的控制导入
导入表数据子集 我们可以导入表的使用Sqoop导入工具,"where"子句的一个子集.它执行在各自的数据库服务器相应的SQL查询,并将结果存储在HDFS的目标目录. where子句 ...
- python matplotlib绘图/sklearn包--make_blobs()
1.make_bolbs() 函数 from sklearn.datasets.samples_generator import make_blobs import numpy as np impor ...