接口的使用
org.springframework.beans.factory.config.BeanDefinition
使用BeanDefinition的程序包 程序包 说明 org.springframework.aop.config Support package for declarative AOP configuration, with XML schema being the primary configuration format.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 theorg.springframework.beans.factory
package.org.springframework.beans.factory.xml Contains an abstract XML-basedBeanFactory
implementation, including a standard "spring-beans" XSD.org.springframework.context.annotation Annotation support for the Application Context, including JSR-250 "common" annotations, component-scanning, and Java-based metadata for creating Spring-managed objects.org.springframework.context.support Classes supporting the org.springframework.context package, such as abstract base classes for ApplicationContext implementations and a MessageSource implementation.org.springframework.scheduling.config Support package for declarative scheduling configuration, with XML schema being the primary configuration format.org.springframework.scripting.config Support package for Spring's dynamic language machinery, with XML schema being the primary configuration format.org.springframework.scripting.support Support classes for Spring's scripting package.org.springframework.web.servlet.config Defines the XML configuration namespace for Spring MVC.org.springframework.aop.config中BeanDefinition的使用
参数类型为BeanDefinition的org.springframework.aop.config中的方法 修饰符和类型 方法 说明 protected String
AbstractInterceptorDrivenBeanDefinitionDecorator. getInterceptorNameSuffix(BeanDefinition interceptorDefinition)
参数类型为BeanDefinition的org.springframework.aop.config中的构造器 构造器 说明 AdvisorComponentDefinition(String advisorBeanName, BeanDefinition advisorDefinition)
AdvisorComponentDefinition(String advisorBeanName, BeanDefinition advisorDefinition, BeanDefinition pointcutDefinition)
AspectComponentDefinition(String aspectName, BeanDefinition[] beanDefinitions, BeanReference[] beanReferences, Object source)
PointcutComponentDefinition(String pointcutBeanName, BeanDefinition pointcutDefinition, String expression)
org.springframework.beans.factory.annotation中BeanDefinition的使用
org.springframework.beans.factory.annotation中BeanDefinition的子接口 修饰符和类型 接口 说明 interface
AnnotatedBeanDefinition
ExtendedBeanDefinition
interface that exposesAnnotationMetadata
about its bean class - without requiring the class to be loaded yet.实现BeanDefinition的org.springframework.beans.factory.annotation中的类 修饰符和类型 类 说明 class
AnnotatedGenericBeanDefinition
Extension of theGenericBeanDefinition
class, adding support for annotation metadata exposed through theAnnotatedBeanDefinition
interface.org.springframework.beans.factory.config中BeanDefinition的使用
返回BeanDefinition的org.springframework.beans.factory.config中的方法 修饰符和类型 方法 说明 BeanDefinition
BeanDefinitionHolder. getBeanDefinition()
Return the wrapped BeanDefinition.BeanDefinition
ConfigurableListableBeanFactory. getBeanDefinition(String beanName)
Return the registered BeanDefinition for the specified bean, allowing access to its property values and constructor argument value (which can be modified during bean factory post-processing).BeanDefinition
ConfigurableBeanFactory. getMergedBeanDefinition(String beanName)
Return a merged BeanDefinition for the given bean name, merging a child bean definition with its parent if necessary.BeanDefinition
BeanDefinition. getOriginatingBeanDefinition()
Return the originating BeanDefinition, ornull
if none.参数类型为BeanDefinition的org.springframework.beans.factory.config中的方法 修饰符和类型 方法 说明 void
BeanDefinitionCustomizer. customize(BeanDefinition bd)
Customize the given bean definition.protected void
DeprecatedBeanWarner. logDeprecatedBean(String beanName, Class<?> beanType, BeanDefinition beanDefinition)
Logs a warning for a bean annotated with@Deprecated
.protected void
BeanDefinitionVisitor. visitBeanClassName(BeanDefinition beanDefinition)
void
BeanDefinitionVisitor. visitBeanDefinition(BeanDefinition beanDefinition)
Traverse the given BeanDefinition object and the MutablePropertyValues and ConstructorArgumentValues contained in them.protected void
BeanDefinitionVisitor. visitFactoryBeanName(BeanDefinition beanDefinition)
protected void
BeanDefinitionVisitor. visitFactoryMethodName(BeanDefinition beanDefinition)
protected void
BeanDefinitionVisitor. visitParentName(BeanDefinition beanDefinition)
protected void
BeanDefinitionVisitor. visitScope(BeanDefinition beanDefinition)
参数类型为BeanDefinition的org.springframework.beans.factory.config中的构造器 构造器 说明 BeanDefinitionHolder(BeanDefinition beanDefinition, String beanName)
Create a new BeanDefinitionHolder.BeanDefinitionHolder(BeanDefinition beanDefinition, String beanName, String[] aliases)
Create a new BeanDefinitionHolder.org.springframework.beans.factory.parsing中BeanDefinition的使用
返回BeanDefinition的org.springframework.beans.factory.parsing中的方法 修饰符和类型 方法 说明 BeanDefinition[]
AbstractComponentDefinition. getBeanDefinitions()
Returns an empty array.BeanDefinition[]
BeanComponentDefinition. getBeanDefinitions()
BeanDefinition[]
ComponentDefinition. getBeanDefinitions()
Return theBeanDefinitions
that were registered to form thisComponentDefinition
.BeanDefinition[]
AbstractComponentDefinition. getInnerBeanDefinitions()
Returns an empty array.BeanDefinition[]
BeanComponentDefinition. getInnerBeanDefinitions()
BeanDefinition[]
ComponentDefinition. getInnerBeanDefinitions()
Return theBeanDefinitions
that represent all relevant inner beans within this component.参数类型为BeanDefinition的org.springframework.beans.factory.parsing中的构造器 构造器 说明 BeanComponentDefinition(BeanDefinition beanDefinition, String beanName)
Create a new BeanComponentDefinition for the given bean.BeanComponentDefinition(BeanDefinition beanDefinition, String beanName, String[] aliases)
Create a new BeanComponentDefinition for the given bean.org.springframework.beans.factory.support中BeanDefinition的使用
实现BeanDefinition的org.springframework.beans.factory.support中的类 修饰符和类型 类 说明 class
AbstractBeanDefinition
Base class for concrete, full-fledgedBeanDefinition
classes, factoring out common properties ofGenericBeanDefinition
,RootBeanDefinition
, andChildBeanDefinition
.class
ChildBeanDefinition
Bean definition for beans which inherit settings from their parent.class
GenericBeanDefinition
GenericBeanDefinition is a one-stop shop for standard bean definition purposes.class
RootBeanDefinition
A root bean definition represents the merged bean definition that backs a specific bean in a Spring BeanFactory at runtime.返回BeanDefinition的org.springframework.beans.factory.support中的方法 修饰符和类型 方法 说明 protected abstract BeanDefinition
AbstractBeanFactory. getBeanDefinition(String beanName)
Return the bean definition for the given bean name.BeanDefinition
BeanDefinitionOverrideException. getBeanDefinition()
Return the newly registered bean definition.BeanDefinition
BeanDefinitionRegistry. getBeanDefinition(String beanName)
Return the BeanDefinition for the given bean name.BeanDefinition
DefaultListableBeanFactory. getBeanDefinition(String beanName)
BeanDefinition
SimpleBeanDefinitionRegistry. getBeanDefinition(String beanName)
BeanDefinition
BeanDefinitionOverrideException. getExistingDefinition()
Return the existing bean definition for the same name.BeanDefinition
AbstractBeanFactory. getMergedBeanDefinition(String name)
Return a 'merged' BeanDefinition for the given bean name, merging a child bean definition with its parent if necessary.BeanDefinition
AbstractBeanDefinition. getOriginatingBeanDefinition()
Return the originating BeanDefinition, ornull
if none.参数类型为BeanDefinition的org.springframework.beans.factory.support中的方法 修饰符和类型 方法 说明 protected void
AbstractAutowireCapableBeanFactory. applyPropertyValues(String beanName, BeanDefinition mbd, BeanWrapper bw, PropertyValues pvs)
Apply the given property values, resolving any runtime references to other beans in this bean factory.protected Object
AbstractBeanFactory. evaluateBeanDefinitionString(String value, BeanDefinition beanDefinition)
Evaluate the given String as contained in a bean definition, potentially resolving it as an expression.static String
BeanDefinitionReaderUtils. generateBeanName(BeanDefinition beanDefinition, BeanDefinitionRegistry registry)
Generate a bean name for the given top-level bean definition, unique within the given bean factory.static String
BeanDefinitionReaderUtils. generateBeanName(BeanDefinition definition, BeanDefinitionRegistry registry, boolean isInnerBean)
Generate a bean name for the given bean definition, unique within the given bean factory.String
BeanNameGenerator. generateBeanName(BeanDefinition definition, BeanDefinitionRegistry registry)
Generate a bean name for the given bean definition.String
DefaultBeanNameGenerator. generateBeanName(BeanDefinition definition, BeanDefinitionRegistry registry)
protected RootBeanDefinition
AbstractBeanFactory. getMergedBeanDefinition(String beanName, BeanDefinition bd)
Return a RootBeanDefinition for the given top-level bean, by merging with the parent if the given bean's definition is a child bean definition.protected RootBeanDefinition
AbstractBeanFactory. getMergedBeanDefinition(String beanName, BeanDefinition bd, BeanDefinition containingBd)
Return a RootBeanDefinition for the given bean, by merging with the parent if the given bean's definition is a child bean definition.void
AbstractBeanDefinition. overrideFrom(BeanDefinition other)
Override settings in this bean definition (presumably a copied parent from a parent-child inheritance relationship) from the given bean definition (presumably the child).void
BeanDefinitionRegistry. registerBeanDefinition(String beanName, BeanDefinition beanDefinition)
Register a new bean definition with this registry.void
DefaultListableBeanFactory. registerBeanDefinition(String beanName, BeanDefinition beanDefinition)
void
SimpleBeanDefinitionRegistry. registerBeanDefinition(String beanName, BeanDefinition beanDefinition)
void
AbstractBeanDefinition. setOriginatingBeanDefinition(BeanDefinition originatingBd)
Set the originating (e.g. decorated) BeanDefinition, if any.参数类型为BeanDefinition的org.springframework.beans.factory.support中的构造器 构造器 说明 AbstractBeanDefinition(BeanDefinition original)
Create a new AbstractBeanDefinition as a deep copy of the given bean definition.BeanDefinitionOverrideException(String beanName, BeanDefinition beanDefinition, BeanDefinition existingDefinition)
Create a new BeanDefinitionOverrideException for the given new and existing definition.GenericBeanDefinition(BeanDefinition original)
Create a new GenericBeanDefinition as deep copy of the given bean definition.org.springframework.beans.factory.xml中BeanDefinition的使用
返回BeanDefinition的org.springframework.beans.factory.xml中的方法 修饰符和类型 方法 说明 BeanDefinition
ParserContext. getContainingBeanDefinition()
BeanDefinition
AbstractBeanDefinitionParser. parse(Element element, ParserContext parserContext)
BeanDefinition
BeanDefinitionParser. parse(Element element, ParserContext parserContext)
Parse the specifiedElement
and register the resultingBeanDefinition(s)
with theBeanDefinitionRegistry
embedded in the suppliedParserContext
.BeanDefinition
NamespaceHandler. parse(Element element, ParserContext parserContext)
Parse the specifiedElement
and register any resultingBeanDefinitions
with theBeanDefinitionRegistry
that is embedded in the suppliedParserContext
.BeanDefinition
NamespaceHandlerSupport. parse(Element element, ParserContext parserContext)
Parses the suppliedElement
by delegating to theBeanDefinitionParser
that is registered for thatElement
.BeanDefinition
SimpleConstructorNamespaceHandler. parse(Element element, ParserContext parserContext)
BeanDefinition
SimplePropertyNamespaceHandler. parse(Element element, ParserContext parserContext)
BeanDefinition
BeanDefinitionParserDelegate. parseCustomElement(Element ele)
Parse a custom element (outside of the default namespace).BeanDefinition
BeanDefinitionParserDelegate. parseCustomElement(Element ele, BeanDefinition containingBd)
Parse a custom element (outside of the default namespace).参数类型为BeanDefinition的org.springframework.beans.factory.xml中的方法 修饰符和类型 方法 说明 BeanDefinitionHolder
BeanDefinitionParserDelegate. decorateBeanDefinitionIfRequired(Element ele, BeanDefinitionHolder originalDef, BeanDefinition containingBd)
Decorate the given bean definition through a namespace handler, if applicable.BeanDefinitionHolder
BeanDefinitionParserDelegate. decorateIfRequired(Node node, BeanDefinitionHolder originalDef, BeanDefinition containingBd)
Decorate the given bean definition through a namespace handler, if applicable.String
XmlReaderContext. generateBeanName(BeanDefinition beanDefinition)
Call the bean name generator for the given bean definition.Object
BeanDefinitionParserDelegate. parseArrayElement(Element arrayEle, BeanDefinition bd)
Parse an array element.AbstractBeanDefinition
BeanDefinitionParserDelegate. parseBeanDefinitionAttributes(Element ele, String beanName, BeanDefinition containingBean, AbstractBeanDefinition bd)
Apply the attributes of the given bean element to the given bean * definition.AbstractBeanDefinition
BeanDefinitionParserDelegate. parseBeanDefinitionElement(Element ele, String beanName, BeanDefinition containingBean)
Parse the bean definition itself, without regard to name or aliases.BeanDefinitionHolder
BeanDefinitionParserDelegate. parseBeanDefinitionElement(Element ele, BeanDefinition containingBean)
Parses the supplied<bean>
element.protected void
BeanDefinitionParserDelegate. parseCollectionElements(NodeList elementNodes, Collection<Object> target, BeanDefinition bd, String defaultElementType)
void
BeanDefinitionParserDelegate. parseConstructorArgElement(Element ele, BeanDefinition bd)
Parse a constructor-arg element.void
BeanDefinitionParserDelegate. parseConstructorArgElements(Element beanEle, BeanDefinition bd)
Parse constructor-arg sub-elements of the given bean element.BeanDefinition
BeanDefinitionParserDelegate. parseCustomElement(Element ele, BeanDefinition containingBd)
Parse a custom element (outside of the default namespace).protected Object
BeanDefinitionParserDelegate. parseKeyElement(Element keyEle, BeanDefinition bd, String defaultKeyTypeName)
Parse a key sub-element of a map element.List<Object>
BeanDefinitionParserDelegate. parseListElement(Element collectionEle, BeanDefinition bd)
Parse a list element.Map<Object,Object>
BeanDefinitionParserDelegate. parseMapElement(Element mapEle, BeanDefinition bd)
Parse a map element.void
BeanDefinitionParserDelegate. parsePropertyElement(Element ele, BeanDefinition bd)
Parse a property element.void
BeanDefinitionParserDelegate. parsePropertyElements(Element beanEle, BeanDefinition bd)
Parse property sub-elements of the given bean element.Object
BeanDefinitionParserDelegate. parsePropertySubElement(Element ele, BeanDefinition bd)
Parse a value, ref or collection sub-element of a property or constructor-arg element.Object
BeanDefinitionParserDelegate. parsePropertySubElement(Element ele, BeanDefinition bd, String defaultValueType)
Parse a value, ref or collection sub-element of a property or constructor-arg element.Object
BeanDefinitionParserDelegate. parsePropertyValue(Element ele, BeanDefinition bd, String propertyName)
Get the value of a property element.Set<Object>
BeanDefinitionParserDelegate. parseSetElement(Element collectionEle, BeanDefinition bd)
Parse a set element.String
XmlReaderContext. registerWithGeneratedName(BeanDefinition beanDefinition)
Call the bean name generator for the given bean definition and register the bean definition under the generated name.参数类型为BeanDefinition的org.springframework.beans.factory.xml中的构造器 构造器 说明 ParserContext(XmlReaderContext readerContext, BeanDefinitionParserDelegate delegate, BeanDefinition containingBeanDefinition)
org.springframework.context.annotation中BeanDefinition的使用
实现BeanDefinition的org.springframework.context.annotation中的类 修饰符和类型 类 说明 class
ScannedGenericBeanDefinition
Extension of theGenericBeanDefinition
class, based on an ASM ClassReader, with support for annotation metadata exposed through theAnnotatedBeanDefinition
interface.返回BeanDefinition的org.springframework.context.annotation中的方法 修饰符和类型 方法 说明 BeanDefinition
AnnotationConfigBeanDefinitionParser. parse(Element element, ParserContext parserContext)
BeanDefinition
ComponentScanBeanDefinitionParser. parse(Element element, ParserContext parserContext)
返回变量类型为BeanDefinition的类型的org.springframework.context.annotation中的方法 修饰符和类型 方法 说明 Set<BeanDefinition>
ClassPathScanningCandidateComponentProvider. findCandidateComponents(String basePackage)
Scan the class path for candidate components.参数类型为BeanDefinition的org.springframework.context.annotation中的方法 修饰符和类型 方法 说明 protected String
AnnotationBeanNameGenerator. buildDefaultBeanName(BeanDefinition definition)
Derive a default bean name from the given bean definition.protected String
AnnotationBeanNameGenerator. buildDefaultBeanName(BeanDefinition definition, BeanDefinitionRegistry registry)
Derive a default bean name from the given bean definition.protected String
FullyQualifiedAnnotationBeanNameGenerator. buildDefaultBeanName(BeanDefinition definition)
protected boolean
ClassPathBeanDefinitionScanner. checkCandidate(String beanName, BeanDefinition beanDefinition)
Check the given candidate's bean name, determining whether the corresponding bean definition needs to be registered or conflicts with an existing definition.String
AnnotationBeanNameGenerator. generateBeanName(BeanDefinition definition, BeanDefinitionRegistry registry)
protected boolean
ClassPathBeanDefinitionScanner. isCompatible(BeanDefinition newDefinition, BeanDefinition existingDefinition)
Determine whether the given new bean definition is compatible with the given existing bean definition.ScopeMetadata
AnnotationScopeMetadataResolver. resolveScopeMetadata(BeanDefinition definition)
ScopeMetadata
Jsr330ScopeMetadataResolver. resolveScopeMetadata(BeanDefinition definition)
ScopeMetadata
ScopeMetadataResolver. resolveScopeMetadata(BeanDefinition definition)
Resolve theScopeMetadata
appropriate to the supplied beandefinition
.org.springframework.context.support中BeanDefinition的使用
返回BeanDefinition的org.springframework.context.support中的方法 修饰符和类型 方法 说明 BeanDefinition
GenericApplicationContext. getBeanDefinition(String beanName)
参数类型为BeanDefinition的org.springframework.context.support中的方法 修饰符和类型 方法 说明 protected String
LiveBeansView. getEscapedResourceDescription(BeanDefinition bd)
Determine a resource description for the given bean definition and apply basic JSON escaping (backslashes, double quotes) to it.protected boolean
LiveBeansView. isBeanEligible(String beanName, BeanDefinition bd, ConfigurableBeanFactory bf)
Determine whether the specified bean is eligible for inclusion in the LiveBeansView JSON snapshot.void
GenericApplicationContext. registerBeanDefinition(String beanName, BeanDefinition beanDefinition)
org.springframework.scheduling.config中BeanDefinition的使用
返回BeanDefinition的org.springframework.scheduling.config中的方法 修饰符和类型 方法 说明 BeanDefinition
AnnotationDrivenBeanDefinitionParser. parse(Element element, ParserContext parserContext)
org.springframework.scripting.config中BeanDefinition的使用
返回BeanDefinition的org.springframework.scripting.config中的方法 修饰符和类型 方法 说明 static BeanDefinition
LangNamespaceUtils. registerScriptFactoryPostProcessorIfNecessary(BeanDefinitionRegistry registry)
Register aScriptFactoryPostProcessor
bean definition in the suppliedBeanDefinitionRegistry
if theScriptFactoryPostProcessor
hasn't already been registered.org.springframework.scripting.support中BeanDefinition的使用
返回BeanDefinition的org.springframework.scripting.support中的方法 修饰符和类型 方法 说明 protected BeanDefinition
ScriptFactoryPostProcessor. createScriptedObjectBeanDefinition(BeanDefinition bd, String scriptFactoryBeanName, ScriptSource scriptSource, Class<?>[] interfaces)
Create a bean definition for the scripted object, based on the given script definition, extracting the definition data that is relevant for the scripted object (that is, everything but bean class and constructor arguments).protected BeanDefinition
ScriptFactoryPostProcessor. createScriptFactoryBeanDefinition(BeanDefinition bd)
Create a ScriptFactory bean definition based on the given script definition, extracting only the definition data that is relevant for the ScriptFactory (that is, only bean class and constructor arguments).参数类型为BeanDefinition的org.springframework.scripting.support中的方法 修饰符和类型 方法 说明 protected Class<?>
ScriptFactoryPostProcessor. createConfigInterface(BeanDefinition bd, Class<?>[] interfaces)
Create a config interface for the given bean definition, defining setter methods for the defined property values as well as an init method and a destroy method (if defined).protected BeanDefinition
ScriptFactoryPostProcessor. createScriptedObjectBeanDefinition(BeanDefinition bd, String scriptFactoryBeanName, ScriptSource scriptSource, Class<?>[] interfaces)
Create a bean definition for the scripted object, based on the given script definition, extracting the definition data that is relevant for the scripted object (that is, everything but bean class and constructor arguments).protected BeanDefinition
ScriptFactoryPostProcessor. createScriptFactoryBeanDefinition(BeanDefinition bd)
Create a ScriptFactory bean definition based on the given script definition, extracting only the definition data that is relevant for the ScriptFactory (that is, only bean class and constructor arguments).protected void
ScriptFactoryPostProcessor. prepareScriptBeans(BeanDefinition bd, String scriptFactoryBeanName, String scriptedObjectBeanName)
Prepare the script beans in the internal BeanFactory that this post-processor uses.protected boolean
ScriptFactoryPostProcessor. resolveProxyTargetClass(BeanDefinition beanDefinition)
protected long
ScriptFactoryPostProcessor. resolveRefreshCheckDelay(BeanDefinition beanDefinition)
Get the refresh check delay for the givenScriptFactory
BeanDefinition
.org.springframework.web.servlet.config中BeanDefinition的使用
返回BeanDefinition的org.springframework.web.servlet.config中的方法 修饰符和类型 方法 说明 BeanDefinition
CorsBeanDefinitionParser. parse(Element element, ParserContext parserContext)
BeanDefinition
ViewResolversBeanDefinitionParser. parse(Element element, ParserContext context)