public class ValidationContext
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static TypeCache<java.util.List<Check>> |
cache |
protected java.util.Map<java.lang.String,java.util.List<Check>> |
map |
Constructor and Description |
---|
ValidationContext() |
Modifier and Type | Method and Description |
---|---|
void |
add(Check check)
Adds validation checks.
|
void |
addAll(java.util.List<Check> checkList)
Adds all checks from provided list.
|
void |
addClassChecks(java.lang.Class target)
Parses class annotations and adds all checks.
|
protected void |
clearCache()
Clears the cache map
|
protected void |
collectAnnotationChecks(java.util.List<Check> annChecks,
java.lang.Class targetType,
java.lang.String targetName,
java.lang.annotation.Annotation[] annotations)
Collect annotations for some target.
|
protected void |
collectPropertyAnnotationChecks(java.util.List<Check> annChecks,
PropertyDescriptor propertyDescriptor)
Process all annotations of provided properties.
|
protected void |
copyDefaultCheckProperties(Check destCheck,
java.lang.annotation.Annotation annotation)
Copies default properties from annotation to the check.
|
protected <V extends ValidationConstraint> |
newConstraint(java.lang.Class<V> constraint,
java.lang.Class targetType)
Create new constraint.
|
static ValidationContext |
resolveFor(java.lang.Class<?> target)
Resolve validation context for provided target class.
|
protected final java.util.Map<java.lang.String,java.util.List<Check>> map
public void add(Check check)
public void addAll(java.util.List<Check> checkList)
public static ValidationContext resolveFor(java.lang.Class<?> target)
addClassChecks(Class)
public void addClassChecks(java.lang.Class target)
resolveFor(Class)
protected void collectPropertyAnnotationChecks(java.util.List<Check> annChecks, PropertyDescriptor propertyDescriptor)
protected void collectAnnotationChecks(java.util.List<Check> annChecks, java.lang.Class targetType, java.lang.String targetName, java.lang.annotation.Annotation[] annotations)
protected <V extends ValidationConstraint> V newConstraint(java.lang.Class<V> constraint, java.lang.Class targetType) throws java.lang.Exception
java.lang.Exception
protected void copyDefaultCheckProperties(Check destCheck, java.lang.annotation.Annotation annotation)
protected void clearCache()
Copyright © 2003-present Jodd Team