Package org.springframework.beans
Interface BeanWrapper
- All Superinterfaces:
- ConfigurablePropertyAccessor,- PropertyAccessor,- PropertyEditorRegistry,- TypeConverter
- All Known Implementing Classes:
- BeanWrapperImpl
The central interface of Spring's low-level JavaBeans infrastructure.
 
Typically not used directly but rather implicitly via a
 BeanFactory or a
 DataBinder.
 
Provides operations to analyze and manipulate standard JavaBeans: the ability to get and set property values (individually or in bulk), get property descriptors, and query the readability/writability of properties.
This interface supports nested properties enabling the setting of properties on subproperties to an unlimited depth.
A BeanWrapper's default for the "extractOldValueForEditor" setting is "false", to avoid side effects caused by getter method invocations. Turn this to "true" to expose present property values to custom editors.
- Since:
- 13 April 2001
- Author:
- Rod Johnson, Juergen Hoeller
- See Also:
- 
Field SummaryFields inherited from interface org.springframework.beans.PropertyAccessorNESTED_PROPERTY_SEPARATOR, NESTED_PROPERTY_SEPARATOR_CHAR, PROPERTY_KEY_PREFIX, PROPERTY_KEY_PREFIX_CHAR, PROPERTY_KEY_SUFFIX, PROPERTY_KEY_SUFFIX_CHAR
- 
Method SummaryModifier and TypeMethodDescriptionintReturn the limit for array and collection auto-growing.getPropertyDescriptor(String propertyName) Obtain the property descriptor for a specific property of the wrapped object.Obtain the PropertyDescriptors for the wrapped object (as determined by standard JavaBeans introspection).Class<?>Return the type of the wrapped bean instance.Return the bean instance wrapped by this object.voidsetAutoGrowCollectionLimit(int autoGrowCollectionLimit) Specify a limit for array and collection auto-growing.Methods inherited from interface org.springframework.beans.ConfigurablePropertyAccessorgetConversionService, isAutoGrowNestedPaths, isExtractOldValueForEditor, setAutoGrowNestedPaths, setConversionService, setExtractOldValueForEditorMethods inherited from interface org.springframework.beans.PropertyAccessorgetPropertyType, getPropertyTypeDescriptor, getPropertyValue, isReadableProperty, isWritableProperty, setPropertyValue, setPropertyValue, setPropertyValues, setPropertyValues, setPropertyValues, setPropertyValuesMethods inherited from interface org.springframework.beans.PropertyEditorRegistryfindCustomEditor, registerCustomEditor, registerCustomEditorMethods inherited from interface org.springframework.beans.TypeConverterconvertIfNecessary, convertIfNecessary, convertIfNecessary, convertIfNecessary
- 
Method Details- 
setAutoGrowCollectionLimitvoid setAutoGrowCollectionLimit(int autoGrowCollectionLimit) Specify a limit for array and collection auto-growing.Default is unlimited on a plain BeanWrapper. - Since:
- 4.1
 
- 
getAutoGrowCollectionLimitint getAutoGrowCollectionLimit()Return the limit for array and collection auto-growing.- Since:
- 4.1
 
- 
getWrappedInstanceObject getWrappedInstance()Return the bean instance wrapped by this object.
- 
getWrappedClassClass<?> getWrappedClass()Return the type of the wrapped bean instance.
- 
getPropertyDescriptorsPropertyDescriptor[] getPropertyDescriptors()Obtain the PropertyDescriptors for the wrapped object (as determined by standard JavaBeans introspection).- Returns:
- the PropertyDescriptors for the wrapped object
 
- 
getPropertyDescriptorObtain the property descriptor for a specific property of the wrapped object.- Parameters:
- propertyName- the property to obtain the descriptor for (may be a nested path, but not an indexed/mapped property)
- Returns:
- the property descriptor for the specified property
- Throws:
- InvalidPropertyException- if there is no such property
 
 
-