|
TUM CCSM Commons | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.tum.cs.commons.constraint.ConstraintValidator
public class ConstraintValidator
A class for storing constraints in the context of classes for which the constraint applies. Additionally it provides methods for checking all matching constraints for a given class.
| Constructor Summary | |
|---|---|
ConstraintValidator()
|
|
| Method Summary | ||
|---|---|---|
|
addConstraint(Class<? extends T> clazz,
ILocalConstraint<T> constraint)
Adds a constraint for a class. |
|
void |
checkConstaints(Object o)
Checks all constraints to the given object which are applicable to it. |
|
|
checkConstaints(Object o,
IExceptionHandler<ConstraintViolationException,X> handler)
Checks all constraints to the given object which are applicable to it. |
|
|
validateMesh(T start,
IMeshWalker<T,X_WALKER> walker)
Validates all reachable elements of a mesh. |
|
|
validateMesh(T start,
IMeshWalker<T,X_WALKER> walker,
IExceptionHandler<ConstraintViolationException,X> handler)
Validates all reachable elements of a mesh. |
|
|
validateTree(T root,
ITreeWalker<T,X_WALKER> walker)
Validates all nodes of a tree. |
|
|
validateTree(T root,
ITreeWalker<T,X_WALKER> walker,
IExceptionHandler<ConstraintViolationException,X> handler)
Validates all nodes of a tree. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConstraintValidator()
| Method Detail |
|---|
public <T> void addConstraint(Class<? extends T> clazz,
ILocalConstraint<T> constraint)
public void checkConstaints(Object o)
throws ConstraintViolationException
ConstraintViolationException - if any constraint is violated
public <X extends Exception> void checkConstaints(Object o,
IExceptionHandler<ConstraintViolationException,X> handler)
throws X extends Exception
X extends Exception
public <T,X_WALKER extends Exception> void validateTree(T root,
ITreeWalker<T,X_WALKER> walker)
throws ConstraintViolationException,
X_WALKER extends Exception
ConstraintViolationException.
root - the root of the tree.walker - the walker used to navigate the tree.
ConstraintViolationException - if a constraint violation was found.
X_WALKER - if the walker throws an exception.
X_WALKER extends Exception
public <T,X extends Exception,X_WALKER extends Exception> void validateTree(T root,
ITreeWalker<T,X_WALKER> walker,
IExceptionHandler<ConstraintViolationException,X> handler)
throws X extends Exception,
X_WALKER extends Exception
root - the root of the tree.walker - the walker used to navigate the tree.handler - the exception handler used for dealing with constraint
violations.
X - if the constraint violation handler throws it.
X_WALKER - if the walker throws an exception.
X extends Exception
public <T,X_WALKER extends Exception> void validateMesh(T start,
IMeshWalker<T,X_WALKER> walker)
throws ConstraintViolationException,
X_WALKER extends Exception
ConstraintViolationException.
start - the start element of the mesh.walker - the walker used to navigate the mesh.
ConstraintViolationException - if a constraint violation was found.
X_WALKER - if the walker throws an exception.
X_WALKER extends Exception
public <T,X extends Exception,X_WALKER extends Exception> void validateMesh(T start,
IMeshWalker<T,X_WALKER> walker,
IExceptionHandler<ConstraintViolationException,X> handler)
throws X extends Exception,
X_WALKER extends Exception
start - the start element of the mesh.walker - the walker used to navigate the mesh.handler - the exception handler used for dealing with constraint
violations.
X - if the constraint violation handler throws it.
X_WALKER - if the walker throws an exception.
X extends Exception
|
TUM CCSM Commons | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||