See the DefaultMessageCodesResolver javadoc for details on
how a message code list is built for a FieldError.
DefaultMessageCodesResolver
| Modifier and Type | Field and Description |
|---|---|
| private final boolean | |
| private final String | |
| private final Object |
| Access | Constructor and Description |
|---|---|
| public | FieldError(String
the name of the affected object objectName, String the affected field of the object field, String the default message to be used to resolve this message defaultMessage)Create a new FieldError instance. |
| public | FieldError(String
the name of the affected object objectName, String the affected field of the object field, Object the rejected field value rejectedValue, boolean whether this error represents a binding failure
(like a type mismatch); else, it is a validation failure bindingFailure, String[] the codes to be used to resolve this message codes, Object[] the array of arguments to be used to resolve this message arguments, String the default message to be used to resolve this message defaultMessage)Create a new FieldError instance. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. other)Overrides org. |
| public String | |
| public Object | |
| public int | hashCode()
Overrides org. |
| public boolean | isBindingFailure()
Return whether this error represents a binding failure (like a type mismatch); otherwise it is a validation failure. |
| public String | toString()
Overrides org. |
| bindingFailure | back to summary |
|---|---|
| private final boolean bindingFailure | |
| field | back to summary |
|---|---|
| private final String field | |
| rejectedValue | back to summary |
|---|---|
| private final Object rejectedValue
| |
| FieldError | back to summary |
|---|---|
| public FieldError(String objectName, String field, String defaultMessage) Create a new FieldError instance. | |
| FieldError | back to summary |
|---|---|
| public FieldError(String objectName, String field, Object rejectedValue, boolean bindingFailure, String[] codes, Object[] arguments, String defaultMessage) Create a new FieldError instance.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides org. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getField | back to summary |
|---|---|
| public String getField() Return the affected field of the object. | |
| getRejectedValue | back to summary |
|---|---|
| public Object getRejectedValue() Return the rejected field value.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides org. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isBindingFailure | back to summary |
|---|---|
| public boolean isBindingFailure() Return whether this error represents a binding failure (like a type mismatch); otherwise it is a validation failure. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides org. Doc from org. The default implementation exposes the attributes of this MessageSourceResolvable. To be overridden in more specific subclasses, potentially including the
resolvable content through
| |