站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 1.2.9 API 文档英文版

Validator (Spring Framework) - Spring Framework 1.2.9 API 文档英文版


org.springframework.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(Class clazz)
          Return whether or not this object can validate objects of the given class.
 void validate(Object obj, Errors errors)
          Validate an object, which must be of a class for which the supports() method returned true.
 

Method Detail

supports

boolean supports(Class clazz)
Return whether or not this object can validate objects of the given class.


validate

void validate(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 validate
errors - Errors object we're building. May contain errors for this field relating to types.


Copyright (c) 2002-2007 The Spring Framework Project.