public class

ObjectError

extends DefaultMessageSourceResolvable
java.lang.Object
   ↳ org.springframework.context.support.DefaultMessageSourceResolvable
     ↳ org.springframework.validation.ObjectError
Known Direct Subclasses

Class Overview

Encapsulates an object error, that is, a global reason for rejecting an object.

See the DefaultMessageCodesResolver javadoc for details on how a message code list is built for an ObjectError.

Summary

Public Constructors
ObjectError(String objectName, String defaultMessage)
Create a new instance of the ObjectError class.
ObjectError(String objectName, String[] codes, Object[] arguments, String defaultMessage)
Create a new instance of the ObjectError class.
Public Methods
boolean equals(Object other)
String getObjectName()
Return the name of the affected object.
int hashCode()
String toString()
Default implementation exposes the attributes of this MessageSourceResolvable.
[Expand]
Inherited Methods
From class org.springframework.context.support.DefaultMessageSourceResolvable
From class java.lang.Object
From interface org.springframework.context.MessageSourceResolvable

Public Constructors

public ObjectError (String objectName, String defaultMessage)

Create a new instance of the ObjectError class.

Parameters
objectName the name of the affected object
defaultMessage the default message to be used to resolve this message

public ObjectError (String objectName, String[] codes, Object[] arguments, String defaultMessage)

Create a new instance of the ObjectError class.

Parameters
objectName the name of the affected object
codes the codes to be used to resolve this message
arguments the array of arguments to be used to resolve this message
defaultMessage the default message to be used to resolve this message

Public Methods

public boolean equals (Object other)

public String getObjectName ()

Return the name of the affected object.

public int hashCode ()

public String toString ()

Default implementation exposes the attributes of this MessageSourceResolvable. To be overridden in more specific subclasses, potentially including the resolvable content through resolvableToString().