Package org.springframework.beans
Interface BeanInfoFactory
- All Known Implementing Classes:
ExtendedBeanInfoFactory
public interface BeanInfoFactory
Strategy interface for creatingBeanInfoinstances for Spring beans. Can be used to plug in custom bean property resolution strategies (e.g. for other languages on the JVM) or more efficientBeanInforetrieval algorithms.BeanInfoFactories are instantiated by the
CachedIntrospectionResults, by using theSpringFactoriesLoaderutility class. When aBeanInfois to be created, theCachedIntrospectionResultswill iterate through the discovered factories, callinggetBeanInfo(Class)on each one. Ifnullis returned, the next factory will be queried. If none of the factories support the class, a standardBeanInfowill be created as a default.Note that the
SpringFactoriesLoadersorts theBeanInfoFactoryinstances by@Order, so that ones with a higher precedence come first.- Since:
- 3.2
- Author:
- Arjen Poutsma
- See Also:
CachedIntrospectionResults,SpringFactoriesLoader
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BeanInfogetBeanInfo(Class<?> beanClass)Return the bean info for the given class, if supported.
Method Detail
getBeanInfo
BeanInfo getBeanInfo(Class<?> beanClass) throws IntrospectionException
Return the bean info for the given class, if supported.- Parameters:
beanClass- the bean class- Returns:
- the BeanInfo, or
nullif the given class is not supported - Throws:
IntrospectionException- in case of exceptions