diff --git a/spring-beans/src/main/java/org/springframework/beans/BeanInfoFactory.java b/spring-beans/src/main/java/org/springframework/beans/BeanInfoFactory.java index dd1b2426afd..2aefdc240d9 100644 --- a/spring-beans/src/main/java/org/springframework/beans/BeanInfoFactory.java +++ b/spring-beans/src/main/java/org/springframework/beans/BeanInfoFactory.java @@ -22,6 +22,20 @@ import java.beans.IntrospectionException; /** * Strategy for creating {@link BeanInfo} instances. * + *

BeanInfoFactories are are instantiated by the {@link CachedIntrospectionResults}, + * which looks for {@code META-INF/spring.beanInfoFactories} files on the class path. + * These files contain one or more {@code BeanInfoFactory} class names, each of a single + * line. When a {@link BeanInfo} is to be created, the {@code CachedIntrospectionResults} + * will iterate through the discovered factories, asking each one if it {@linkplain + * #supports(Class) supports} the given bean class. If it does, {@link + * #getBeanInfo(Class)} will be called; if not, the next factory will be queried. If none + * of the factories support the class, an standard {@link BeanInfo} is created as a + * default. + * + *

Note that the {@link CachedIntrospectionResults} sorts the {@code BeanInfoFactory} + * instances by {@link org.springframework.core.annotation.Order Order}, so that ones with + * a higher precedence come first. + * * @author Arjen Poutsma * @since 3.2 */