| 程序包 | 说明 |
|---|---|
| org.springframework.beans.factory |
The core package implementing Spring's lightweight Inversion of Control (IoC) container.
|
| org.springframework.beans.factory.annotation |
Support package for annotation-driven bean configuration.
|
| org.springframework.beans.factory.config |
SPI interfaces and configuration-related convenience classes for bean factories.
|
| org.springframework.beans.factory.support |
Classes supporting the
org.springframework.beans.factory package. |
| org.springframework.beans.factory.wiring |
Mechanism to determine bean wiring metadata from a bean instance.
|
| org.springframework.beans.factory.xml |
Contains an abstract XML-based
BeanFactory implementation,
including a standard "spring-beans" XSD. |
| 限定符和类型 | 接口和说明 |
|---|---|
interface |
HierarchicalBeanFactory
分层的Bean工厂
|
interface |
ListableBeanFactory
ListableBeanFactory接口是BeanFactory接口的一个扩展。
|
| 限定符和类型 | 方法和说明 |
|---|---|
BeanFactory |
HierarchicalBeanFactory.getParentBeanFactory()
返回本Bean工厂的父工厂
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
BeanFactoryAware.setBeanFactory(BeanFactory beanFactory)
Callback that supplies the owning factory to a bean instance.
|
| 限定符和类型 | 方法和说明 |
|---|---|
static boolean |
BeanFactoryAnnotationUtils.isQualifierMatch(Predicate<String> qualifier,
String beanName,
BeanFactory beanFactory)
Check whether the named bean declares a qualifier of the given name.
|
static <T> T |
BeanFactoryAnnotationUtils.qualifiedBeanOfType(BeanFactory beanFactory,
Class<T> beanType,
String qualifier)
Obtain a bean of type
T from the given BeanFactory declaring a
qualifier (e.g. via <qualifier> or @Qualifier) matching the given
qualifier, or having a bean name matching the given qualifier. |
void |
AutowiredAnnotationBeanPostProcessor.setBeanFactory(BeanFactory beanFactory) |
void |
RequiredAnnotationBeanPostProcessor.setBeanFactory(BeanFactory beanFactory) |
| 限定符和类型 | 接口和说明 |
|---|---|
interface |
AutowireCapableBeanFactory |
interface |
ConfigurableBeanFactory
Configuration interface to be implemented by most bean factories.
|
interface |
ConfigurableListableBeanFactory
Configuration interface to be implemented by most listable bean factories.
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected BeanFactory |
AbstractFactoryBean.getBeanFactory()
Return the BeanFactory that this bean runs in.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Object |
DependencyDescriptor.resolveCandidate(String beanName,
Class<?> requiredType,
BeanFactory beanFactory)
Resolve the specified bean name, as a candidate result of the matching
algorithm for this dependency, to a bean instance from the given factory.
|
Object |
DependencyDescriptor.resolveShortcut(BeanFactory beanFactory)
Resolve a shortcut for this dependency against the given factory, for example
taking some pre-resolved information into account.
|
void |
AbstractFactoryBean.setBeanFactory(BeanFactory beanFactory) |
void |
MethodInvokingBean.setBeanFactory(BeanFactory beanFactory) |
void |
PlaceholderConfigurerSupport.setBeanFactory(BeanFactory beanFactory)
Only necessary to check that we're not parsing our own bean definition,
to avoid failing on unresolvable placeholders in properties file locations.
|
void |
PropertyPathFactoryBean.setBeanFactory(BeanFactory beanFactory) |
void |
ServiceLocatorFactoryBean.setBeanFactory(BeanFactory beanFactory) |
void |
ConfigurableBeanFactory.setParentBeanFactory(BeanFactory parentBeanFactory)
Set the parent of this bean factory.
|
| 限定符和类型 | 类和说明 |
|---|---|
class |
AbstractAutowireCapableBeanFactory
Abstract bean factory superclass that implements default bean creation,
with the full capabilities specified by the
RootBeanDefinition class. |
class |
AbstractBeanFactory
Abstract base class for
BeanFactory
implementations, providing the full capabilities of the
ConfigurableBeanFactory SPI. |
class |
DefaultListableBeanFactory
Spring's default implementation of the
ConfigurableListableBeanFactory
and BeanDefinitionRegistry interfaces: a full-fledged bean factory
based on bean definition metadata, extensible through post-processors. |
class |
StaticListableBeanFactory
Static
BeanFactory implementation
which allows to register existing singleton instances programmatically. |
| 限定符和类型 | 方法和说明 |
|---|---|
protected BeanFactory |
GenericTypeAwareAutowireCandidateResolver.getBeanFactory() |
BeanFactory |
AbstractBeanFactory.getParentBeanFactory() |
| 限定符和类型 | 方法和说明 |
|---|---|
Object |
InstantiationStrategy.instantiate(RootBeanDefinition bd,
String beanName,
BeanFactory owner)
Return an instance of the bean with the given name in this factory.
|
Object |
SimpleInstantiationStrategy.instantiate(RootBeanDefinition bd,
String beanName,
BeanFactory owner) |
Object |
InstantiationStrategy.instantiate(RootBeanDefinition bd,
String beanName,
BeanFactory owner,
Constructor<?> ctor,
Object... args)
Return an instance of the bean with the given name in this factory,
creating it via the given constructor.
|
Object |
SimpleInstantiationStrategy.instantiate(RootBeanDefinition bd,
String beanName,
BeanFactory owner,
Constructor<?> ctor,
Object... args) |
Object |
InstantiationStrategy.instantiate(RootBeanDefinition bd,
String beanName,
BeanFactory owner,
Object factoryBean,
Method factoryMethod,
Object... args)
Return an instance of the bean with the given name in this factory,
creating it via the given factory method.
|
Object |
SimpleInstantiationStrategy.instantiate(RootBeanDefinition bd,
String beanName,
BeanFactory owner,
Object factoryBean,
Method factoryMethod,
Object... args) |
protected Object |
CglibSubclassingInstantiationStrategy.instantiateWithMethodInjection(RootBeanDefinition bd,
String beanName,
BeanFactory owner) |
protected Object |
SimpleInstantiationStrategy.instantiateWithMethodInjection(RootBeanDefinition bd,
String beanName,
BeanFactory owner)
Subclasses can override this method, which is implemented to throw
UnsupportedOperationException, if they can instantiate an object with
the Method Injection specified in the given RootBeanDefinition.
|
protected Object |
CglibSubclassingInstantiationStrategy.instantiateWithMethodInjection(RootBeanDefinition bd,
String beanName,
BeanFactory owner,
Constructor<?> ctor,
Object... args) |
protected Object |
SimpleInstantiationStrategy.instantiateWithMethodInjection(RootBeanDefinition bd,
String beanName,
BeanFactory owner,
Constructor<?> ctor,
Object... args)
Subclasses can override this method, which is implemented to throw
UnsupportedOperationException, if they can instantiate an object with
the Method Injection specified in the given RootBeanDefinition.
|
void |
GenericTypeAwareAutowireCandidateResolver.setBeanFactory(BeanFactory beanFactory) |
void |
AbstractBeanFactory.setParentBeanFactory(BeanFactory parentBeanFactory) |
| 构造器和说明 |
|---|
AbstractAutowireCapableBeanFactory(BeanFactory parentBeanFactory)
Create a new AbstractAutowireCapableBeanFactory with the given parent.
|
AbstractBeanFactory(BeanFactory parentBeanFactory)
Create a new AbstractBeanFactory with the given parent.
|
DefaultListableBeanFactory(BeanFactory parentBeanFactory)
Create a new DefaultListableBeanFactory with the given parent.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
BeanConfigurerSupport.setBeanFactory(BeanFactory beanFactory)
Set the
BeanFactory in which this aspect must configure beans. |
| 限定符和类型 | 类和说明 |
|---|---|
class |
XmlBeanFactory
已过时。
as of Spring 3.1 in favor of
DefaultListableBeanFactory and
XmlBeanDefinitionReader |
| 构造器和说明 |
|---|
XmlBeanFactory(org.springframework.core.io.Resource resource,
BeanFactory parentBeanFactory)
已过时。
Create a new XmlBeanFactory with the given input stream,
which must be parsable using DOM.
|