org.exolab.castor.xml
Class Validator

java.lang.Object
  extended by org.exolab.castor.xml.Validator
All Implemented Interfaces:
ClassValidator, TypeValidator
Direct Known Subclasses:
FieldValidator, XMLClassDescriptorImpl

public class Validator
extends java.lang.Object
implements ClassValidator

A class which can perform Validation on an Object model. This class uses the ClassDescriptors and FieldDescriptors to perform the validation.

Version:
$Revision: 1.2 $ $Date: 2005/03/01 00:43:25 $
Author:
Keith Visco

Constructor Summary
Validator()
          Creates a new Validator
 
Method Summary
 void validate(java.lang.Object object)
          Validates the given Object
 void validate(java.lang.Object object, ValidationContext context)
          Validates the given Object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Validator

public Validator()
Creates a new Validator

Method Detail

validate

public void validate(java.lang.Object object)
              throws ValidationException
Validates the given Object

Parameters:
object - the Object to validate
Throws:
ValidationException

validate

public void validate(java.lang.Object object,
                     ValidationContext context)
              throws ValidationException
Validates the given Object

Specified by:
validate in interface ClassValidator
Specified by:
validate in interface TypeValidator
Parameters:
object - the Object to validate
context - the ValidationContext to use during validation.
Throws:
ValidationException - when the class is not valid.


Intalio Inc. (C) 1999-2004. All rights reserved http://www.intalio.com