|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.github.fge.jsonschema.core.util.ArgumentChecker<T>
T - type of the argument to check@Beta public abstract class ArgumentChecker<T>
An argument checker
The only method of this interface returns nothing; it is supposed to throw
a RuntimeException or derivate if the argument supplied is not legal.
Typically, this will be IllegalArgumentException or, if you disallow
null arguments, NullPointerException.
Note that the argument to check may be null.
| Field Summary | |
|---|---|
protected static MessageBundle |
BUNDLE
|
| Constructor Summary | |
|---|---|
ArgumentChecker()
|
|
| Method Summary | ||
|---|---|---|
static
|
anythingGoes()
As its name says |
|
abstract void |
check(T argument)
Check the sanity of an argument |
|
static
|
notNull()
An argument checker refusing null arguments; fails with a standard message |
|
static
|
notNull(String message)
An argument checker refusing null arguments; fails with a customized message |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final MessageBundle BUNDLE
| Constructor Detail |
|---|
public ArgumentChecker()
| Method Detail |
|---|
public static <X> ArgumentChecker<X> anythingGoes()
X - the type of the argument
public static <X> ArgumentChecker<X> notNull()
X - the type of the argument
public static <X> ArgumentChecker<X> notNull(String message)
X - the type of the argumentmessage - the message to fail with
NullPointerException - message is null
public abstract void check(@Nullable
T argument)
argument - the argument
RuntimeException - see description
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||