Package org.springframework.validation
Class DirectFieldBindingResult
java.lang.Object
org.springframework.validation.AbstractErrors
org.springframework.validation.AbstractBindingResult
org.springframework.validation.AbstractPropertyBindingResult
org.springframework.validation.DirectFieldBindingResult
- All Implemented Interfaces:
- Serializable,- BindingResult,- Errors
Special implementation of the Errors and BindingResult interfaces,
 supporting registration and evaluation of binding errors on value objects.
 Performs direct field access instead of going through JavaBean getters.
 
Since Spring 4.1 this implementation is able to traverse nested fields.
- Since:
- 2.0
- Author:
- Juergen Hoeller
- See Also:
- 
Field SummaryFields inherited from interface org.springframework.validation.BindingResultMODEL_KEY_PREFIXFields inherited from interface org.springframework.validation.ErrorsNESTED_PATH_SEPARATOR
- 
Constructor SummaryConstructorsConstructorDescriptionDirectFieldBindingResult(Object target, String objectName) Create a newDirectFieldBindingResultfor the given target.DirectFieldBindingResult(Object target, String objectName, boolean autoGrowNestedPaths) Create a newDirectFieldBindingResultfor the given target.
- 
Method SummaryModifier and TypeMethodDescriptionprotected ConfigurablePropertyAccessorCreate a new DirectFieldAccessor for the underlying target object.Returns the DirectFieldAccessor that this instance uses.final ObjectReturn the wrapped target object.Methods inherited from class org.springframework.validation.AbstractPropertyBindingResultcanonicalFieldName, findEditor, formatFieldValue, getActualFieldValue, getCustomEditor, getFieldType, getPropertyEditorRegistry, initConversionMethods inherited from class org.springframework.validation.AbstractBindingResultaddAllErrors, addError, equals, getAllErrors, getErrorCount, getFieldError, getFieldError, getFieldErrors, getFieldErrors, getFieldValue, getGlobalError, getGlobalErrors, getMessageCodesResolver, getModel, getObjectName, getRawFieldValue, getSuppressedFields, hasErrors, hashCode, recordFieldValue, recordSuppressedField, reject, rejectValue, resolveMessageCodes, resolveMessageCodes, setMessageCodesResolverMethods inherited from class org.springframework.validation.AbstractErrorsdoSetNestedPath, fixedField, getFieldErrorCount, getFieldErrorCount, getGlobalErrorCount, getNestedPath, hasFieldErrors, hasFieldErrors, hasGlobalErrors, isMatchingFieldError, popNestedPath, pushNestedPath, reject, reject, rejectValue, rejectValue, setNestedPath, toStringMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.validation.ErrorsgetFieldErrorCount, getFieldErrorCount, getGlobalErrorCount, getNestedPath, hasFieldErrors, hasFieldErrors, hasGlobalErrors, popNestedPath, pushNestedPath, reject, reject, rejectValue, rejectValue, setNestedPath
- 
Constructor Details- 
DirectFieldBindingResultCreate a newDirectFieldBindingResultfor the given target.- Parameters:
- target- the target object to bind onto
- objectName- the name of the target object
 
- 
DirectFieldBindingResultpublic DirectFieldBindingResult(@Nullable Object target, String objectName, boolean autoGrowNestedPaths) Create a newDirectFieldBindingResultfor the given target.- Parameters:
- target- the target object to bind onto
- objectName- the name of the target object
- autoGrowNestedPaths- whether to "auto-grow" a nested path that contains a null value
 
 
- 
- 
Method Details- 
getTargetDescription copied from class:AbstractBindingResultReturn the wrapped target object.- Specified by:
- getTargetin interface- BindingResult
- Specified by:
- getTargetin class- AbstractBindingResult
 
- 
getPropertyAccessorReturns the DirectFieldAccessor that this instance uses. Creates a new one if none existed before.- Specified by:
- getPropertyAccessorin class- AbstractPropertyBindingResult
- See Also:
 
- 
createDirectFieldAccessorCreate a new DirectFieldAccessor for the underlying target object.- See Also:
 
 
-