org.springframework.validation
Class ObjectError
java.lang.Object
org.springframework.context.support.DefaultMessageSourceResolvable
org.springframework.validation.ObjectError
- All Implemented Interfaces:
- Serializable, MessageSourceResolvable
- Direct Known Subclasses:
- FieldError
public class ObjectError
- extends DefaultMessageSourceResolvable
Class that encapsulates an object error, i.e. a global reason for
rejecting an object.
See DefaultMessageCodesResolver javadoc for details on how a message
code list is built for an ObjectError.
- Since:
- 10.03.2003
- Author:
- Juergen Hoeller
- See Also:
FieldError
,
DefaultMessageCodesResolver
,
Serialized Form
ObjectError
public ObjectError(String objectName,
String[] codes,
Object[] arguments,
String defaultMessage)
- Create a new ObjectError instance.
- Parameters:
objectName
- the name of the affected objectcodes
- 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 message
getObjectName
public String getObjectName()
- Return the name of the affected object.
toString
public String toString()
- Overrides:
toString
in class DefaultMessageSourceResolvable
Copyright (c) 2002-2007 The Spring Framework Project.