Top Description Fields Constructors Methods
org.springframework.beans

public Class StandardBeanInfoFactory

extends Object
implements BeanInfoFactory, Ordered
Class Inheritance
All Implemented Interfaces
org.springframework.core.Ordered, org.springframework.beans.BeanInfoFactory
Known Direct Subclasses
org.springframework.beans.ExtendedBeanInfoFactory
Imports
java.beans.BeanInfo, .IntrospectionException, .Introspector, org.springframework.core.Ordered, .SpringProperties, org.springframework.lang.NonNull

BeanInfoFactory implementation that performs standard java.beans.Introspector inspection.

To be configured via a META-INF/spring.factories file with the following content: org.springframework.beans.BeanInfoFactory=org.springframework.beans.StandardBeanInfoFactory

Ordered at Ordered#LOWEST_PRECEDENCE to allow other user-defined BeanInfoFactory types to take precedence.

Author
Juergen Hoeller
Since
6.0
See Also
ExtendedBeanInfoFactory, CachedIntrospectionResults, Introspector#getBeanInfo(Class)

Field Summary

Modifier and TypeField and Description
public static final String
IGNORE_BEANINFO_PROPERTY_NAME

System property that instructs Spring to use the Introspector#IGNORE_ALL_BEANINFO mode when calling the JavaBeans Introspector: "spring.beaninfo.ignore", with a value of "true" skipping the search for BeanInfo classes (typically for scenarios where no such classes are being defined for beans in the application in the first place).

private static final boolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public BeanInfo
getBeanInfo(Class<?>
the bean class
beanClass
)

Implements org.springframework.beans.BeanInfoFactory.getBeanInfo.

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

public int
getOrder()

Implements org.springframework.core.Ordered.getOrder.

Get the order value of this object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

IGNORE_BEANINFO_PROPERTY_NAMEback to summary
public static final String IGNORE_BEANINFO_PROPERTY_NAME

System property that instructs Spring to use the Introspector#IGNORE_ALL_BEANINFO mode when calling the JavaBeans Introspector: "spring.beaninfo.ignore", with a value of "true" skipping the search for BeanInfo classes (typically for scenarios where no such classes are being defined for beans in the application in the first place).

The default is "false", considering all BeanInfo metadata classes, like for standard Introspector#getBeanInfo(Class) calls. Consider switching this flag to "true" if you experience repeated ClassLoader access for non-existing BeanInfo classes, in case such access is expensive on startup or on lazy loading.

Note that such an effect may also indicate a scenario where caching doesn't work effectively: Prefer an arrangement where the Spring jars live in the same ClassLoader as the application classes, which allows for clean caching along with the application's lifecycle in any case. For a web application, consider declaring a local org.springframework.web.util.IntrospectorCleanupListener in web.xml in case of a multi-ClassLoader layout, which will allow for effective caching as well.

See Also
Introspector#getBeanInfo(Class, int)
shouldIntrospectorIgnoreBeaninfoClassesback to summary
private static final boolean shouldIntrospectorIgnoreBeaninfoClasses

Constructor Detail

StandardBeanInfoFactoryback to summary
public StandardBeanInfoFactory()

Method Detail

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

Implements org.springframework.beans.BeanInfoFactory.getBeanInfo.

Doc from org.springframework.beans.BeanInfoFactory.getBeanInfo.

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
@Override
@NonNull
Exceptions
IntrospectionException:
in case of exceptions
getOrderback to summary
public int getOrder()

Implements org.springframework.core.Ordered.getOrder.

Doc from org.springframework.core.Ordered.getOrder.

Get the order value of this object.

Higher values are interpreted as lower priority. As a consequence, the object with the lowest value has the highest priority (somewhat analogous to Servlet load-on-startup values).

Same order values will result in arbitrary sort positions for the affected objects.

Returns:int

the order value

Annotations
@Override