public class BeanValidator extends Object
This class provides validation services within the constraint framework.
Copyright 2010 (C) by Martin Ganserer
| Constructor and Description |
|---|
BeanValidator(Object validationTarget)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
static List<ConstraintViolation> |
checkConstraints(Object value,
Set<Annotation> annotations)
Check constraints
|
ConstrainedClass |
getConstrainedClass() |
void |
validate()
Validate object
|
List<ConstraintViolation> |
validateProperty(ConstrainedClass constrainedClass,
String propertyName,
Object value)
Checks if the value is valid
|
public BeanValidator(Object validationTarget)
validationTarget - IllegalArgumentException - if validationTarget is nullpublic ConstrainedClass getConstrainedClass()
public void validate()
throws PropertyConstraintViolationException
public List<ConstraintViolation> validateProperty(ConstrainedClass constrainedClass, String propertyName, Object value) throws IntrospectionException
constrainedClass - propertyName - value - IntrospectionException - if there are problems accessing the propertypublic static List<ConstraintViolation> checkConstraints(Object value, Set<Annotation> annotations) throws IntrospectionException
value - the value to be checkedannotations - IntrospectionExceptionCopyright © 2016. All rights reserved.