Validates the inputs provided by users.
| Type | Name and description |
|---|---|
static T |
notNull(T object, java.lang.String message)Throws org.gradle.api.GradleException with specified message if the object is null. |
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. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Throws org.gradle.api.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 nullSimilar to 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 org.gradle.api.GradleException with specified message is thrown
object - 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