|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjodd.vtor.ValidationContext
public class ValidationContext
Validation context is set of all checks that can be applied on one target. Checks can be added manually or by parsing the class.
| Field Summary | |
|---|---|
protected java.util.Map<java.lang.String,java.util.List<Check>> |
map
|
| Constructor Summary | |
|---|---|
ValidationContext()
|
|
| Method Summary | ||
|---|---|---|
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 |
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 |
collectFieldAnnotationChecks(java.util.List<Check> annChecks,
java.lang.reflect.Field field)
Process all annotations of provided field. |
|
protected void |
copyDefaultCheckProperties(Check destCheck,
java.lang.annotation.Annotation annotation)
Copies default properties from annotation to the check. |
|
protected
|
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. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final java.util.Map<java.lang.String,java.util.List<Check>> map
| Constructor Detail |
|---|
public ValidationContext()
| Method Detail |
|---|
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 collectFieldAnnotationChecks(java.util.List<Check> annChecks,
java.lang.reflect.Field field)
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)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||