|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.context.support.DefaultMessageSourceResolvable org.springframework.validation.ObjectError org.springframework.validation.FieldError
public class FieldError
Class that encapsulates a field error, i.e. a reason for rejecting a specific field value.
See DefaultMessageCodesResolver javadoc for details on how a message code list is built for a FieldError.
DefaultMessageCodesResolver
,
Serialized FormConstructor Summary | |
---|---|
FieldError(String objectName,
String field,
Object rejectedValue,
boolean bindingFailure,
String[] codes,
Object[] arguments,
String defaultMessage)
Create a new FieldError instance. |
Method Summary | |
---|---|
String |
getField()
Return the affected field of the object. |
Object |
getRejectedValue()
Return the rejected field value. |
boolean |
isBindingFailure()
Return whether this error represents a binding failure (like a type mismatch); else, it is a validation failure. |
String |
toString()
|
Methods inherited from class org.springframework.validation.ObjectError |
---|
getObjectName |
Methods inherited from class org.springframework.context.support.DefaultMessageSourceResolvable |
---|
getArguments, getCode, getCodes, getDefaultMessage, resolvableToString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FieldError(String objectName, String field, Object rejectedValue, boolean bindingFailure, String[] codes, Object[] arguments, String defaultMessage)
objectName
- the name of the affected objectfield
- the affected field of the objectrejectedValue
- the rejected field valuebindingFailure
- whether this error represents a binding failure
(like a type mismatch); else, it is a validation failurecodes
- the codes to be used to resolve this messagearguments
- the array of arguments to be used to resolve this messagedefaultMessage
- the default message to be used to resolve this messageMethod Detail |
---|
public String getField()
public Object getRejectedValue()
public boolean isBindingFailure()
public String toString()
toString
in class ObjectError
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |