Top Description Methods
org.springframework.beans

public Interface BeanInfoFactory

Known Direct Implementers
org.springframework.beans.SimpleBeanInfoFactory, org.springframework.beans.StandardBeanInfoFactory
Imports
java.beans.BeanInfo, .IntrospectionException, org.springframework.lang.Nullable

Strategy interface for creating BeanInfo 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 efficient BeanInfo retrieval algorithms.

BeanInfoFactories are instantiated by the CachedIntrospectionResults, by using the org.springframework.core.io.support.SpringFactoriesLoader utility class. When a BeanInfo is to be created, the CachedIntrospectionResults will iterate through the discovered factories, calling getBeanInfo(Class) on each one. If null is returned, the next factory will be queried. If none of the factories support the class, a standard BeanInfo will be created as a default.

Note that the org.springframework.core.io.support.SpringFactoriesLoader sorts the BeanInfoFactory instances by @Order, so that ones with a higher precedence come first.

Author
Arjen Poutsma
Since
3.2
See Also
CachedIntrospectionResults, org.springframework.core.io.support.SpringFactoriesLoader

Method Summary

Modifier and TypeMethod and Description
public BeanInfo

Returns:

the BeanInfo, or null if the given class is not supported
getBeanInfo
(Class<?>
the bean class
beanClass
)

Return the bean info for the given class, if supported.

Method Detail

getBeanInfoback to summary
public BeanInfo getBeanInfo(Class<?> beanClass) throws IntrospectionException

Return the bean info for the given class, if supported.

Parameters
beanClass:Class<?>

the bean class

Returns:BeanInfo

the BeanInfo, or null if the given class is not supported

Annotations
@Nullable
Exceptions
IntrospectionException:
in case of exceptions