com.interface21.validation
Interface Validator
- public interface Validator
Interface to be implemented by objects that can validate
application-specific objects. This enables validation to
be decoupled from the interface and placed in business objects.
- Author:
- Rod Johnson
|
Method Summary |
boolean |
supports(java.lang.Class clazz)
Return whether or not this object can validate objects
of the given class. |
void |
validate(java.lang.Object obj,
Errors errors)
Validate an object, which must be of a class for which
the supports() method returned true. |
supports
public boolean supports(java.lang.Class clazz)
- Return whether or not this object can validate objects
of the given class.
validate
public void validate(java.lang.Object obj,
Errors errors)
- Validate an object, which must be of a class for which
the supports() method returned true.
- Parameters:
obj - Populated object to validateerrors - Errors object we're building. May contain
errors for this field relating to types.
Rod Johnson and Spring contributors 2001-2003.