Package org.springframework.beans

# Class StandardBeanInfoFactory

java.lang.Object
org.springframework.beans.StandardBeanInfoFactory

All Implemented Interfaces:
  `BeanInfoFactory`, `org.springframework.core.Ordered`

Direct Known Subclasses:
  `ExtendedBeanInfoFactory`

public class StandardBeanInfoFactory extends Object implements BeanInfoFactory, org.springframework.core.Ordered
`BeanInfoFactory` implementation that performs standard `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.

Since:
  6.0
Author:
  Juergen Hoeller
See Also:
  - `ExtendedBeanInfoFactory`
  - `CachedIntrospectionResults`
  - `Introspector.getBeanInfo(Class)`

## Field Summary

Fields
Modifier and Type
Field
Description
`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).

### Fields inherited from interface org.springframework.core.Ordered

`HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE`

## Constructor Summary

Constructors
Constructor
Description
`StandardBeanInfoFactory()`

## Method Summary

Modifier and Type
Method
Description
`BeanInfo`
`getBeanInfo(Class<?> beanClass)`
Return the bean info for the given class, if supported.
`int`
`getOrder()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### IGNORE_BEANINFO_PROPERTY_NAME

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)`
  - Constant Field Values

## Constructor Details

### StandardBeanInfoFactory

public StandardBeanInfoFactory()

## Method Details

### getBeanInfo

@NonNull public BeanInfo getBeanInfo(Class<?> beanClass) throws IntrospectionException
Description copied from interface: `BeanInfoFactory`
Return the bean info for the given class, if supported.

Specified by:
  `getBeanInfo` in interface `BeanInfoFactory`
Parameters:
  `beanClass` - the bean class
Returns:
  the BeanInfo, or `null` if the given class is not supported
Throws:
  `IntrospectionException` - in case of exceptions

### getOrder

public int getOrder()

Specified by:
  `getOrder` in interface `org.springframework.core.Ordered`