public class BasicValidator
extends java.lang.Object
| Constructor and Description |
|---|
BasicValidator() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
notNull(java.lang.String object,
java.lang.String envVariable,
java.lang.String message)
Similar to
notNull(Object, String)
but checks the env variable as fallback if object is null. |
static <T> T |
notNull(T object,
java.lang.String message)
Throws
GradleException with specified message if the object is null. |
public static <T> T notNull(T object,
java.lang.String message)
GradleException with specified message if the object is null.
Returns the object if it is not not null.object - the value to check for not-nullmessage - the exception message emitted if object parameter is nullpublic static java.lang.String notNull(java.lang.String object,
java.lang.String envVariable,
java.lang.String message)
notNull(Object, String)
but checks the env variable as fallback if object is null.
If object is null and the env variable is null or empty
the GradleException with specified message is thrownobject - the value to check for not-nullenvVariable - the name of env variable to inspect as fallback if object is nullmessage - the exception message if object and env variable value are null