public final class Validator extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
validate(Object parameter)
Validates a user provided required parameter to be not null.
|
static void |
validate(Object parameter,
ServiceCallback<?> serviceCallback)
Validates a user provided required parameter to be not null.
|
public static void validate(Object parameter) throws IllegalArgumentException
IllegalArgumentException is thrown if a property fails the validation.parameter - the parameter to validateIllegalArgumentException - thrown when the Validator determines the argument is invalidpublic static void validate(Object parameter, ServiceCallback<?> serviceCallback)
IllegalArgumentException is passed
to the ServiceCallback.failure(Throwable) if a property fails the validation.parameter - the parameter to validateserviceCallback - the callback to call with the failure/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/