| 程序包 | 说明 |
|---|---|
| org.springframework.beans |
This package contains interfaces and classes for manipulating Java beans.
|
| 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.parsing |
Support infrastructure for bean definition parsing.
|
| org.springframework.beans.factory.support |
Classes supporting the
org.springframework.beans.factory package. |
| org.springframework.beans.factory.xml |
Contains an abstract XML-based
BeanFactory implementation,
including a standard "spring-beans" XSD. |
| org.springframework.beans.support |
Classes supporting the org.springframework.beans package,
such as utility classes for sorting and holding lists of beans.
|
| 限定符和类型 | 类和说明 |
|---|---|
class |
BeanInstantiationException
Exception thrown when instantiation of a bean failed.
|
class |
ConversionNotSupportedException
Exception thrown when no suitable editor or converter can be found for a bean property.
|
class |
FatalBeanException
Thrown on an unrecoverable problem encountered in the
beans packages or sub-packages, e.g. bad class or field.
|
class |
InvalidPropertyException
Exception thrown when referring to an invalid bean property.
|
class |
MethodInvocationException
Thrown when a bean property getter or setter method throws an exception,
analogous to an InvocationTargetException.
|
class |
NotReadablePropertyException
Exception thrown on an attempt to get the value of a property
that isn't readable, because there's no getter method.
|
class |
NotWritablePropertyException
Exception thrown on an attempt to set the value of a property that
is not writable (typically because there is no setter method).
|
class |
NullValueInNestedPathException
Exception thrown when navigation of a valid nested property
path encounters a NullPointerException.
|
class |
PropertyAccessException
Superclass for exceptions related to a property access,
such as type mismatch or invocation target exception.
|
class |
PropertyBatchUpdateException
Combined exception, composed of individual PropertyAccessException instances.
|
class |
TypeMismatchException
Exception thrown on a type mismatch when trying to set a bean property.
|
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
BeanUtils.copyProperties(Object source,
Object target)
Copy the property values of the given source bean into the target bean.
|
static void |
BeanUtils.copyProperties(Object source,
Object target,
Class<?> editable)
Copy the property values of the given source bean into the given target bean,
only setting properties defined in the given "editable" class (or interface).
|
static void |
BeanUtils.copyProperties(Object source,
Object target,
String... ignoreProperties)
Copy the property values of the given source bean into the given target bean,
ignoring the given "ignoreProperties".
|
static PropertyDescriptor |
BeanUtils.findPropertyForMethod(Method method)
Find a JavaBeans
PropertyDescriptor for the given method,
with the method either being the read method or the write method for
that bean property. |
static PropertyDescriptor |
BeanUtils.findPropertyForMethod(Method method,
Class<?> clazz)
Find a JavaBeans
PropertyDescriptor for the given method,
with the method either being the read method or the write method for
that bean property. |
static PropertyDescriptor |
BeanUtils.getPropertyDescriptor(Class<?> clazz,
String propertyName)
Retrieve the JavaBeans
PropertyDescriptors for the given property. |
static PropertyDescriptor[] |
BeanUtils.getPropertyDescriptors(Class<?> clazz)
Retrieve the JavaBeans
PropertyDescriptors of a given class. |
protected AbstractNestablePropertyAccessor.PropertyHandler |
AbstractNestablePropertyAccessor.getPropertyHandler(String propertyName)
Return the
AbstractNestablePropertyAccessor.PropertyHandler for the specified propertyName, navigating
if necessary. |
Class<?> |
AbstractNestablePropertyAccessor.getPropertyType(String propertyName) |
Class<?> |
PropertyAccessor.getPropertyType(String propertyName)
Determine the property type for the specified property,
either checking the property descriptor or checking the value
in case of an indexed or mapped element.
|
org.springframework.core.convert.TypeDescriptor |
AbstractNestablePropertyAccessor.getPropertyTypeDescriptor(String propertyName) |
org.springframework.core.convert.TypeDescriptor |
PropertyAccessor.getPropertyTypeDescriptor(String propertyName)
Return a type descriptor for the specified property:
preferably from the read method, falling back to the write method.
|
protected Object |
AbstractNestablePropertyAccessor.getPropertyValue(AbstractNestablePropertyAccessor.PropertyTokenHolder tokens) |
Object |
AbstractNestablePropertyAccessor.getPropertyValue(String propertyName) |
abstract Object |
AbstractPropertyAccessor.getPropertyValue(String propertyName)
Actually get the value of a property.
|
Object |
PropertyAccessor.getPropertyValue(String propertyName)
Get the current value of the specified property.
|
protected void |
AbstractNestablePropertyAccessor.setPropertyValue(AbstractNestablePropertyAccessor.PropertyTokenHolder tokens,
PropertyValue pv) |
void |
AbstractNestablePropertyAccessor.setPropertyValue(PropertyValue pv) |
void |
AbstractPropertyAccessor.setPropertyValue(PropertyValue pv) |
void |
PropertyAccessor.setPropertyValue(PropertyValue pv)
Set the specified value as current property value.
|
void |
AbstractNestablePropertyAccessor.setPropertyValue(String propertyName,
Object value) |
abstract void |
AbstractPropertyAccessor.setPropertyValue(String propertyName,
Object value)
Actually set a property value.
|
void |
PropertyAccessor.setPropertyValue(String propertyName,
Object value)
Set the specified value as current property value.
|
void |
AbstractPropertyAccessor.setPropertyValues(Map<?,?> map) |
void |
PropertyAccessor.setPropertyValues(Map<?,?> map)
Perform a batch update from a Map.
|
void |
AbstractPropertyAccessor.setPropertyValues(PropertyValues pvs) |
void |
PropertyAccessor.setPropertyValues(PropertyValues pvs)
The preferred way to perform a batch update.
|
void |
AbstractPropertyAccessor.setPropertyValues(PropertyValues pvs,
boolean ignoreUnknown) |
void |
PropertyAccessor.setPropertyValues(PropertyValues pvs,
boolean ignoreUnknown)
Perform a batch update with more control over behavior.
|
void |
AbstractPropertyAccessor.setPropertyValues(PropertyValues pvs,
boolean ignoreUnknown,
boolean ignoreInvalid) |
void |
PropertyAccessor.setPropertyValues(PropertyValues pvs,
boolean ignoreUnknown,
boolean ignoreInvalid)
Perform a batch update with full control over behavior.
|
| 限定符和类型 | 类和说明 |
|---|---|
class |
BeanCreationException
Exception thrown when a BeanFactory encounters an error when
attempting to create a bean from a bean definition.
|
class |
BeanCreationNotAllowedException
Exception thrown in case of a bean being requested despite
bean creation currently not being allowed (for example, during
the shutdown phase of a bean factory).
|
class |
BeanCurrentlyInCreationException
Exception thrown in case of a reference to a bean that's currently in creation.
|
class |
BeanDefinitionStoreException
Exception thrown when a BeanFactory encounters an invalid bean definition:
e.g. in case of incomplete or contradictory bean metadata.
|
class |
BeanExpressionException
Exception that indicates an expression evaluation attempt having failed.
|
class |
BeanInitializationException
Exception that a bean implementation is suggested to throw if its own
factory-aware initialization code fails.
|
class |
BeanIsAbstractException
Exception thrown when a bean instance has been requested for
a bean definition which has been marked as abstract.
|
class |
BeanIsNotAFactoryException
Exception thrown when a bean is not a factory, but a user tries to get
at the factory for the given bean name.
|
class |
BeanNotOfRequiredTypeException
Thrown when a bean doesn't match the expected type.
|
class |
CannotLoadBeanClassException
Exception thrown when the BeanFactory cannot load the specified class
of a given bean.
|
class |
FactoryBeanNotInitializedException
Exception to be thrown from a FactoryBean's
getObject() method
if the bean is not fully initialized yet, for example because it is involved
in a circular reference. |
class |
NoSuchBeanDefinitionException
Exception thrown when a
BeanFactory is asked for a bean instance for which it
cannot find a definition. |
class |
NoUniqueBeanDefinitionException
Exception thrown when a
BeanFactory is asked for a bean instance for which
multiple matching candidates have been found when only one matching bean was expected. |
class |
UnsatisfiedDependencyException
Exception thrown when a bean depends on other beans or simple properties
that were not specified in the bean factory definition, although
dependency checking was enabled.
|
| 限定符和类型 | 方法和说明 |
|---|---|
static <T> T |
BeanFactoryUtils.beanOfType(ListableBeanFactory lbf,
Class<T> type)
Return a single bean of the given type or subtypes, not looking in ancestor
factories.
|
static <T> T |
BeanFactoryUtils.beanOfType(ListableBeanFactory lbf,
Class<T> type,
boolean includeNonSingletons,
boolean allowEagerInit)
Return a single bean of the given type or subtypes, not looking in ancestor
factories.
|
static <T> T |
BeanFactoryUtils.beanOfTypeIncludingAncestors(ListableBeanFactory lbf,
Class<T> type)
Return a single bean of the given type or subtypes, also picking up beans
defined in ancestor bean factories if the current bean factory is a
HierarchicalBeanFactory.
|
static <T> T |
BeanFactoryUtils.beanOfTypeIncludingAncestors(ListableBeanFactory lbf,
Class<T> type,
boolean includeNonSingletons,
boolean allowEagerInit)
Return a single bean of the given type or subtypes, also picking up beans
defined in ancestor bean factories if the current bean factory is a
HierarchicalBeanFactory.
|
static <T> Map<String,T> |
BeanFactoryUtils.beansOfTypeIncludingAncestors(ListableBeanFactory lbf,
Class<T> type)
Return all beans of the given type or subtypes, also picking up beans defined in
ancestor bean factories if the current bean factory is a HierarchicalBeanFactory.
|
static <T> Map<String,T> |
BeanFactoryUtils.beansOfTypeIncludingAncestors(ListableBeanFactory lbf,
Class<T> type,
boolean includeNonSingletons,
boolean allowEagerInit)
Return all beans of the given type or subtypes, also picking up beans defined in
ancestor bean factories if the current bean factory is a HierarchicalBeanFactory.
|
<T> T |
BeanFactory.getBean(Class<T> requiredType)
通过指定的bean的类型去容器中获取对象 若容器中有多个想同类型的bean
我们通过ctx.getBean(beanType.class) 就会抛出异常
|
<T> T |
BeanFactory.getBean(Class<T> requiredType,
Object... args)
获取bean实例
|
Object |
BeanFactory.getBean(String name)
通过bean 去容器中获取一个bean对象
|
<T> T |
BeanFactory.getBean(String name,
Class<T> requiredType)
通过bean 去容器中获取一个bean对象
|
Object |
BeanFactory.getBean(String name,
Object... args)
通过bean 去容器中获取一个bean对象
|
<T> Map<String,T> |
ListableBeanFactory.getBeansOfType(Class<T> type)
返回此BeanFactory中所有指定类型(或指定类型的子类型)的Bean的名字。
|
<T> Map<String,T> |
ListableBeanFactory.getBeansOfType(Class<T> type,
boolean includeNonSingletons,
boolean allowEagerInit)
返回此BeanFactory中所有指定类型(或指定类型的子类型)的Bean的名字。
|
Map<String,Object> |
ListableBeanFactory.getBeansWithAnnotation(Class<? extends Annotation> annotationType)
找到所有带有指定注解的Bean,返回一个以Bean的name为键,其对应的Bean实例为值的Map
|
T |
ObjectProvider.getIfAvailable()
Return an instance (possibly shared or independent) of the object
managed by this factory.
|
default T |
ObjectProvider.getIfAvailable(Supplier<T> defaultSupplier)
Return an instance (possibly shared or independent) of the object
managed by this factory.
|
T |
ObjectProvider.getIfUnique()
Return an instance (possibly shared or independent) of the object
managed by this factory.
|
default T |
ObjectProvider.getIfUnique(Supplier<T> defaultSupplier)
Return an instance (possibly shared or independent) of the object
managed by this factory.
|
T |
ObjectFactory.getObject()
Return an instance (possibly shared or independent)
of the object managed by this factory.
|
T |
ObjectProvider.getObject(Object... args)
Return an instance (possibly shared or independent) of the object
managed by this factory.
|
default void |
ObjectProvider.ifAvailable(Consumer<T> dependencyConsumer)
Consume an instance (possibly shared or independent) of the object
managed by this factory, if available.
|
default void |
ObjectProvider.ifUnique(Consumer<T> dependencyConsumer)
Consume an instance (possibly shared or independent) of the object
managed by this factory, if unique.
|
void |
BeanFactoryAware.setBeanFactory(BeanFactory beanFactory)
Callback that supplies the owning factory to a bean instance.
|
| 构造器和说明 |
|---|
UnsatisfiedDependencyException(String resourceDescription,
String beanName,
InjectionPoint injectionPoint,
BeansException ex)
Create a new UnsatisfiedDependencyException.
|
UnsatisfiedDependencyException(String resourceDescription,
String beanName,
String propertyName,
BeansException ex)
Create a new UnsatisfiedDependencyException.
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected <T> Map<String,T> |
AutowiredAnnotationBeanPostProcessor.findAutowireCandidates(Class<T> type)
Obtain all beans of the given type as autowire candidates.
|
Object |
InitDestroyAnnotationBeanPostProcessor.postProcessAfterInitialization(Object bean,
String beanName) |
void |
CustomAutowireConfigurer.postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) |
void |
InitDestroyAnnotationBeanPostProcessor.postProcessBeforeDestruction(Object bean,
String beanName) |
Object |
InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(Object bean,
String beanName) |
PropertyValues |
RequiredAnnotationBeanPostProcessor.postProcessPropertyValues(PropertyValues pvs,
PropertyDescriptor[] pds,
Object bean,
String beanName) |
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. |
| 限定符和类型 | 方法和说明 |
|---|---|
protected Exception |
ServiceLocatorFactoryBean.createServiceLocatorException(Constructor<Exception> exceptionConstructor,
BeansException cause)
Create a service locator exception for the given cause.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Object |
AutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(Object existingBean,
String beanName)
Apply
BeanPostProcessors to the given existing bean
instance, invoking their postProcessAfterInitialization methods. |
Object |
AutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(Object existingBean,
String beanName)
Apply
BeanPostProcessors to the given existing bean
instance, invoking their postProcessBeforeInitialization methods. |
void |
AutowireCapableBeanFactory.applyBeanPropertyValues(Object existingBean,
String beanName)
Apply the property values of the bean definition with the given name to
the given bean instance.
|
Object |
AutowireCapableBeanFactory.autowire(Class<?> beanClass,
int autowireMode,
boolean dependencyCheck)
Instantiate a new bean instance of the given class with the specified autowire
strategy.
|
void |
AutowireCapableBeanFactory.autowireBean(Object existingBean)
Populate the given bean instance through applying after-instantiation callbacks
and bean property post-processing (e.g. for annotation-driven injection).
|
void |
AutowireCapableBeanFactory.autowireBeanProperties(Object existingBean,
int autowireMode,
boolean dependencyCheck)
Autowire the bean properties of the given bean instance by name or type.
|
Object |
AutowireCapableBeanFactory.configureBean(Object existingBean,
String beanName)
Configure the given raw bean: autowiring bean properties, applying
bean property values, applying factory callbacks such as
setBeanName
and setBeanFactory, and also applying all bean post processors
(including ones which might wrap the given raw bean). |
Object |
AutowireCapableBeanFactory.createBean(Class<?> beanClass,
int autowireMode,
boolean dependencyCheck)
Fully create a new bean instance of the given class with the specified
autowire strategy.
|
<T> T |
AutowireCapableBeanFactory.createBean(Class<T> beanClass)
根据class对象创建bean
Performs full initialization of the bean, including all applicable
BeanPostProcessors. |
Constructor<?>[] |
InstantiationAwareBeanPostProcessorAdapter.determineCandidateConstructors(Class<?> beanClass,
String beanName) |
default Constructor<?>[] |
SmartInstantiationAwareBeanPostProcessor.determineCandidateConstructors(Class<?> beanClass,
String beanName)
Determine the candidate constructors to use for the given bean.
|
Object |
BeanExpressionResolver.evaluate(String value,
BeanExpressionContext evalContext)
Evaluate the given value as an expression, if applicable;
return the value as-is otherwise.
|
Object |
InstantiationAwareBeanPostProcessorAdapter.getEarlyBeanReference(Object bean,
String beanName) |
default Object |
SmartInstantiationAwareBeanPostProcessor.getEarlyBeanReference(Object bean,
String beanName)
Obtain a reference for early access to the specified bean,
typically for the purpose of resolving a circular reference.
|
Object |
PropertyPathFactoryBean.getObject() |
Object |
AutowireCapableBeanFactory.initializeBean(Object existingBean,
String beanName)
Initialize the given raw bean, applying factory callbacks
such as
setBeanName and setBeanFactory,
also applying all bean post processors (including ones which
might wrap the given raw bean). |
default Object |
BeanPostProcessor.postProcessAfterInitialization(Object bean,
String beanName)
Apply this BeanPostProcessor to the given new bean instance after any bean
initialization callbacks (like InitializingBean's
afterPropertiesSet
or a custom init-method). |
Object |
InstantiationAwareBeanPostProcessorAdapter.postProcessAfterInitialization(Object bean,
String beanName) |
default boolean |
InstantiationAwareBeanPostProcessor.postProcessAfterInstantiation(Object bean,
String beanName)
Perform operations after the bean has been instantiated, via a constructor or factory method,
but before Spring property population (from explicit properties or autowiring) occurs.
|
boolean |
InstantiationAwareBeanPostProcessorAdapter.postProcessAfterInstantiation(Object bean,
String beanName) |
void |
BeanFactoryPostProcessor.postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
Modify the application context's internal bean factory after its standard
initialization.
|
void |
CustomEditorConfigurer.postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) |
void |
CustomScopeConfigurer.postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) |
void |
DeprecatedBeanWarner.postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) |
void |
PropertyResourceConfigurer.postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
|
void |
DestructionAwareBeanPostProcessor.postProcessBeforeDestruction(Object bean,
String beanName)
Apply this BeanPostProcessor to the given bean instance before its
destruction, e.g. invoking custom destruction callbacks.
|
default Object |
BeanPostProcessor.postProcessBeforeInitialization(Object bean,
String beanName)
Apply this BeanPostProcessor to the given new bean instance before any bean
initialization callbacks (like InitializingBean's
afterPropertiesSet
or a custom init-method). |
Object |
InstantiationAwareBeanPostProcessorAdapter.postProcessBeforeInitialization(Object bean,
String beanName) |
default Object |
InstantiationAwareBeanPostProcessor.postProcessBeforeInstantiation(Class<?> beanClass,
String beanName)
Apply this BeanPostProcessor before the target bean gets instantiated.
|
Object |
InstantiationAwareBeanPostProcessorAdapter.postProcessBeforeInstantiation(Class<?> beanClass,
String beanName) |
default PropertyValues |
InstantiationAwareBeanPostProcessor.postProcessPropertyValues(PropertyValues pvs,
PropertyDescriptor[] pds,
Object bean,
String beanName)
Post-process the given property values before the factory applies them
to the given bean.
|
PropertyValues |
InstantiationAwareBeanPostProcessorAdapter.postProcessPropertyValues(PropertyValues pvs,
PropertyDescriptor[] pds,
Object bean,
String beanName) |
Class<?> |
InstantiationAwareBeanPostProcessorAdapter.predictBeanType(Class<?> beanClass,
String beanName) |
default Class<?> |
SmartInstantiationAwareBeanPostProcessor.predictBeanType(Class<?> beanClass,
String beanName)
Predict the type of the bean to be eventually returned from this
processor's
InstantiationAwareBeanPostProcessor.postProcessBeforeInstantiation(java.lang.Class<?>, java.lang.String) callback. |
void |
ConfigurableListableBeanFactory.preInstantiateSingletons()
Ensure that all non-lazy-init singletons are instantiated, also considering
FactoryBeans. |
protected void |
PropertyOverrideConfigurer.processKey(ConfigurableListableBeanFactory factory,
String key,
String value)
Process the given key as 'beanName.property' entry.
|
protected void |
PropertyOverrideConfigurer.processProperties(ConfigurableListableBeanFactory beanFactory,
Properties props) |
protected void |
PropertyPlaceholderConfigurer.processProperties(ConfigurableListableBeanFactory beanFactoryToProcess,
Properties props)
Visit each bean definition in the given bean factory and attempt to replace ${...} property
placeholders with values from the given properties.
|
protected abstract void |
PropertyResourceConfigurer.processProperties(ConfigurableListableBeanFactory beanFactory,
Properties props)
Apply the given Properties to the given BeanFactory.
|
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 |
AutowireCapableBeanFactory.resolveDependency(DependencyDescriptor descriptor,
String requestingBeanName)
Resolve the specified dependency against the beans defined in this factory.
|
Object |
AutowireCapableBeanFactory.resolveDependency(DependencyDescriptor descriptor,
String requestingBeanName,
Set<String> autowiredBeanNames,
TypeConverter typeConverter)
Resolve the specified dependency against the beans defined in this factory.
|
<T> NamedBeanHolder<T> |
AutowireCapableBeanFactory.resolveNamedBean(Class<T> requiredType)
Resolve the bean instance that uniquely matches the given object type, if any,
including its bean name.
|
Object |
DependencyDescriptor.resolveNotUnique(Class<?> type,
Map<String,Object> matchingBeans)
Resolve the specified not-unique scenario: by default,
throwing a
NoUniqueBeanDefinitionException. |
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 |
ServiceLocatorFactoryBean.setBeanFactory(BeanFactory beanFactory) |
| 限定符和类型 | 类和说明 |
|---|---|
class |
BeanDefinitionParsingException
Exception thrown when a bean definition reader encounters an error
during the parsing process.
|
| 限定符和类型 | 类和说明 |
|---|---|
class |
BeanDefinitionValidationException
Exception thrown when the validation of a bean definition failed.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Object |
AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(Object existingBean,
String beanName) |
Object |
AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(Object existingBean,
String beanName) |
void |
AbstractAutowireCapableBeanFactory.applyBeanPropertyValues(Object existingBean,
String beanName) |
Object |
AbstractAutowireCapableBeanFactory.autowire(Class<?> beanClass,
int autowireMode,
boolean dependencyCheck) |
void |
AbstractAutowireCapableBeanFactory.autowireBeanProperties(Object existingBean,
int autowireMode,
boolean dependencyCheck) |
Object |
AbstractAutowireCapableBeanFactory.configureBean(Object existingBean,
String beanName) |
Object |
AbstractAutowireCapableBeanFactory.createBean(Class<?> beanClass,
int autowireMode,
boolean dependencyCheck) |
<T> T |
AbstractAutowireCapableBeanFactory.createBean(Class<T> beanClass) |
protected Constructor<?>[] |
AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(Class<?> beanClass,
String beanName)
通过SmartInstantiationAwareBeanPostProcessor的后置处理器的determineCandidateConstructors来查找出对应的构造函数
SmartInstantiationAwareBeanPostProcessors |
protected <T> T |
AbstractBeanFactory.doGetBean(String name,
Class<T> requiredType,
Object[] args,
boolean typeCheckOnly)
返回bean的实例,该实例可能是单例bean 也有可能是原型的bean
|
Object |
DefaultListableBeanFactory.doResolveDependency(DependencyDescriptor descriptor,
String beanName,
Set<String> autowiredBeanNames,
TypeConverter typeConverter) |
<T> T |
DefaultListableBeanFactory.getBean(Class<T> requiredType) |
<T> T |
StaticListableBeanFactory.getBean(Class<T> requiredType) |
<T> T |
DefaultListableBeanFactory.getBean(Class<T> requiredType,
Object... args) |
<T> T |
StaticListableBeanFactory.getBean(Class<T> requiredType,
Object... args) |
Object |
AbstractBeanFactory.getBean(String name)
该方法是一个空壳方法,没有任何的实现逻辑 真正的逻辑调用在doGetBean()中
该接口是实现了BeanFactory的getBean(String name)接口
|
Object |
StaticListableBeanFactory.getBean(String name) |
<T> T |
AbstractBeanFactory.getBean(String name,
Class<T> requiredType) |
<T> T |
StaticListableBeanFactory.getBean(String name,
Class<T> requiredType) |
<T> T |
AbstractBeanFactory.getBean(String name,
Class<T> requiredType,
Object... args)
Return an instance, which may be shared or independent, of the specified bean.
|
Object |
AbstractBeanFactory.getBean(String name,
Object... args) |
Object |
StaticListableBeanFactory.getBean(String name,
Object... args) |
protected abstract BeanDefinition |
AbstractBeanFactory.getBeanDefinition(String beanName)
Return the bean definition for the given bean name.
|
<T> Map<String,T> |
DefaultListableBeanFactory.getBeansOfType(Class<T> type) |
<T> Map<String,T> |
StaticListableBeanFactory.getBeansOfType(Class<T> type) |
<T> Map<String,T> |
DefaultListableBeanFactory.getBeansOfType(Class<T> type,
boolean includeNonSingletons,
boolean allowEagerInit) |
<T> Map<String,T> |
StaticListableBeanFactory.getBeansOfType(Class<T> type,
boolean includeNonSingletons,
boolean allowEagerInit) |
Map<String,Object> |
StaticListableBeanFactory.getBeansWithAnnotation(Class<? extends Annotation> annotationType) |
protected FactoryBean<?> |
FactoryBeanRegistrySupport.getFactoryBean(String beanName,
Object beanInstance)
Get a FactoryBean for the given bean if possible.
|
BeanDefinition |
AbstractBeanFactory.getMergedBeanDefinition(String name)
Return a 'merged' BeanDefinition for the given bean name,
merging a child bean definition with its parent if necessary.
|
protected RootBeanDefinition |
AbstractBeanFactory.getMergedLocalBeanDefinition(String beanName)
Return a merged RootBeanDefinition, traversing the parent bean definition
if the specified bean corresponds to a child bean definition.
|
Object |
InstantiationStrategy.instantiate(RootBeanDefinition bd,
String beanName,
BeanFactory owner)
Return an instance of the bean with the given name in this factory.
|
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 |
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.
|
void |
BeanDefinitionRegistryPostProcessor.postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry)
Modify the application context's internal bean definition registry after its
standard initialization.
|
protected Object |
FactoryBeanRegistrySupport.postProcessObjectFromFactoryBean(Object object,
String beanName)
Post-process the given object that has been obtained from the FactoryBean.
|
void |
DefaultListableBeanFactory.preInstantiateSingletons() |
protected void |
PropertiesBeanDefinitionReader.registerBeanDefinition(String beanName,
Map<?,?> map,
String prefix,
String resourceDescription)
Get all property values, given a prefix (which will be stripped)
and add the bean they define to the factory with the given name.
|
int |
PropertiesBeanDefinitionReader.registerBeanDefinitions(Map<?,?> map)
Register bean definitions contained in a Map, using all property keys (i.e. not
filtering by prefix).
|
int |
PropertiesBeanDefinitionReader.registerBeanDefinitions(Map<?,?> map,
String prefix)
Register bean definitions contained in a Map.
|
int |
PropertiesBeanDefinitionReader.registerBeanDefinitions(Map<?,?> map,
String prefix,
String resourceDescription)
Register bean definitions contained in a Map.
|
Object |
AbstractAutowireCapableBeanFactory.resolveDependency(DependencyDescriptor descriptor,
String requestingBeanName) |
Object |
DefaultListableBeanFactory.resolveDependency(DependencyDescriptor descriptor,
String requestingBeanName,
Set<String> autowiredBeanNames,
TypeConverter typeConverter) |
<T> NamedBeanHolder<T> |
DefaultListableBeanFactory.resolveNamedBean(Class<T> requiredType) |
| 限定符和类型 | 类和说明 |
|---|---|
class |
XmlBeanDefinitionStoreException
XML-specific BeanDefinitionStoreException subclass that wraps a
SAXException, typically a SAXParseException
which contains information about the error location. |
| 构造器和说明 |
|---|
XmlBeanFactory(org.springframework.core.io.Resource resource)
已过时。
Create a new XmlBeanFactory with the given resource,
which must be parsable using DOM.
|
XmlBeanFactory(org.springframework.core.io.Resource resource,
BeanFactory parentBeanFactory)
已过时。
Create a new XmlBeanFactory with the given input stream,
which must be parsable using DOM.
|
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
PropertyComparator.sort(List<?> source,
SortDefinition sortDefinition)
Sort the given List according to the given sort definition.
|
static void |
PropertyComparator.sort(Object[] source,
SortDefinition sortDefinition)
Sort the given source according to the given sort definition.
|