net.sourceforge.annovalidator.validation
Class AnnotatedObjectValidator
java.lang.Object
net.sourceforge.annovalidator.validation.AnnotatedObjectValidator
public class AnnotatedObjectValidator
- extends java.lang.Object
Validates an object based on ValidatorDescriptors applied to
its Fields.
|
Method Summary |
static void |
validate(java.lang.Object object,
ValidationResult result)
Validates an object based on annotations on its fields. |
static void |
validate(java.lang.Object object,
ValidationResult result,
java.lang.Integer step)
Validates an object based on annotations on its fields. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AnnotatedObjectValidator
public AnnotatedObjectValidator()
validate
public static void validate(java.lang.Object object,
ValidationResult result)
- Validates an object based on annotations on its fields. A field is
validated if it is marked with an
Annotation which is in
turn annotated with a ValidatioAnnotation describing the
validator class and method used to perform the validation.
- Parameters:
object - The object being validated.result - A BindingResult for storing the results of
validation. The result for each validation contains a
generated (unless specified by the annotation) error code, and
the value of the field as an argument for the error message
resolver.
validate
public static void validate(java.lang.Object object,
ValidationResult result,
java.lang.Integer step)
- Validates an object based on annotations on its fields. A field is
validated if it is marked with an
Annotation which is in
turn annotated with a ValidatioAnnotation describing the
validator class and method used to perform the validation.
- Parameters:
object - The object being validated.result - A BindingResult for storing the results of
validation. The result for each validation contains a
generated (unless specified by the annotation) error code, and
the value of the field as an argument for the error message
resolver.step - The current step in a multistep form, used to determine
whether fields with a ValidationStep annotation
should be validated.
Copyright © 2008. All Rights Reserved.