|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectpatterntesting.runtime.util.AssertArg
public abstract class AssertArg
This utility class is intended to check arguments. It is like the Assert
class in Springframework and throws an IllegalArgumentException if
the argument is not valid.
This class is abstract to avoid that it is instantiated. There are only static methods so there is no need to instantiate it. This is the same way like the Springframework does it.
For more information about the use of bean validation have a look at Bean Validation with Hibernate Validator framework
.
| Constructor Summary | |
|---|---|
AssertArg()
|
|
| Method Summary | |
|---|---|
static void |
isValid(Object argument,
javax.validation.Validator validator)
Checks if the argument is valid. |
static void |
isValid(javax.validation.Validator validatable)
Checks if the argument is valid. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AssertArg()
| Method Detail |
|---|
public static void isValid(javax.validation.Validator validatable)
IllegalArgumentException will be thrown.
validatable - the validatable argument
public static void isValid(Object argument,
javax.validation.Validator validator)
IllegalArgumentException will be thrown.
argument - the argumentvalidator - the validator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||