Top Description Fields Constructors Methods
org.springframework.validation

public Class BeanPropertyBindingResult

extends AbstractPropertyBindingResult
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Annotations
@SuppressWarnings:serial
Imports
java.io.Serializable, org.springframework.beans.BeanWrapper, .ConfigurablePropertyAccessor, .PropertyAccessorFactory, org.springframework.lang.Nullable

Default implementation of the Errors and BindingResult interfaces, for the registration and evaluation of binding errors on JavaBean objects.

Performs standard JavaBean property access, also supporting nested properties. Normally, application code will work with the Errors interface or the BindingResult interface. A DataBinder returns its BindingResult via DataBinder#getBindingResult().

Author
Juergen Hoeller
Since
2.0
See Also
DataBinder#getBindingResult(), DataBinder#initBeanPropertyAccess(), DirectFieldBindingResult

Field Summary

Modifier and TypeField and Description
private final int
private final boolean
private transient BeanWrapper
private final Object

Constructor Summary

AccessConstructor and Description
public
BeanPropertyBindingResult(Object
the target bean to bind onto
target
,
String
the name of the target object
objectName
)

Create a new BeanPropertyBindingResult for the given target.

public
BeanPropertyBindingResult(Object
the target bean to bind onto
target
,
String
the name of the target object
objectName
,
boolean
whether to "auto-grow" a nested path that contains a null value
autoGrowNestedPaths
,
int
the limit for array and collection auto-growing
autoGrowCollectionLimit
)

Create a new BeanPropertyBindingResult for the given target.

Method Summary

Modifier and TypeMethod and Description
protected BeanWrapper
createBeanWrapper()

Create a new BeanWrapper for the underlying target object.

public final ConfigurablePropertyAccessor
public final Object
Inherited from org.springframework.validation.AbstractPropertyBindingResult:
canonicalFieldNamefindEditorformatFieldValuegetActualFieldValuegetCustomEditorgetFieldTypegetPropertyEditorRegistryinitConversion

Field Detail

autoGrowCollectionLimitback to summary
private final int autoGrowCollectionLimit
autoGrowNestedPathsback to summary
private final boolean autoGrowNestedPaths
beanWrapperback to summary
private transient BeanWrapper beanWrapper
Annotations
@Nullable
targetback to summary
private final Object target
Annotations
@Nullable

Constructor Detail

BeanPropertyBindingResultback to summary
public BeanPropertyBindingResult(Object target, String objectName)

Create a new BeanPropertyBindingResult for the given target.

Parameters
target:Object

the target bean to bind onto

objectName:String

the name of the target object

BeanPropertyBindingResultback to summary
public BeanPropertyBindingResult(Object target, String objectName, boolean autoGrowNestedPaths, int autoGrowCollectionLimit)

Create a new BeanPropertyBindingResult for the given target.

Parameters
target:Object

the target bean to bind onto

objectName:String

the name of the target object

autoGrowNestedPaths:boolean

whether to "auto-grow" a nested path that contains a null value

autoGrowCollectionLimit:int

the limit for array and collection auto-growing

Method Detail

createBeanWrapperback to summary
protected BeanWrapper createBeanWrapper()

Create a new BeanWrapper for the underlying target object.

See Also
getTarget()
getPropertyAccessorback to summary
public final ConfigurablePropertyAccessor getPropertyAccessor()

Implements abstract org.springframework.validation.AbstractPropertyBindingResult.getPropertyAccessor.

Returns the BeanWrapper that this instance uses. Creates a new one if none existed before.

Annotations
@Override
See Also
createBeanWrapper()
getTargetback to summary
public final Object getTarget()

Implements abstract org.springframework.validation.AbstractBindingResult.getTarget.

Implements org.springframework.validation.BindingResult.getTarget.

Doc from org.springframework.validation.AbstractBindingResult.getTarget.

Return the wrapped target object.

Annotations
@Override
@Nullable