接口 BeanInfoFactory
- 所有已知实现类:
ExtendedBeanInfoFactory
public interface BeanInfoFactory
Strategy interface for creatingBeanInfo
instances for Spring beans. Can be used to plug in custom bean property resolution strategies (e.g. for other languages on the JVM) or more efficientBeanInfo
retrieval algorithms.BeanInfoFactories are instantiated by the
CachedIntrospectionResults
, by using theSpringFactoriesLoader
utility class. When aBeanInfo
is to be created, theCachedIntrospectionResults
will iterate through the discovered factories, callinggetBeanInfo(Class)
on each one. Ifnull
is returned, the next factory will be queried. If none of the factories support the class, a standardBeanInfo
will be created as a default.Note that the
SpringFactoriesLoader
sorts theBeanInfoFactory
instances by@Order
, so that ones with a higher precedence come first.- 从以下版本开始:
- 3.2
- 作者:
- Arjen Poutsma
- 另请参阅:
CachedIntrospectionResults
,SpringFactoriesLoader
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 BeanInfo
getBeanInfo(Class<?> beanClass)
Return the bean info for the given class, if supported.
方法详细资料
getBeanInfo
BeanInfo getBeanInfo(Class<?> beanClass) throws IntrospectionException
Return the bean info for the given class, if supported.- 参数:
beanClass
- the bean class- 返回:
- the BeanInfo, or
null
if the given class is not supported - 抛出:
IntrospectionException
- in case of exceptions