public class ConfigValidationUtils extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
ConfigValidationUtils.FieldValidator
Declares methods for validating configuration values.
|
static class |
ConfigValidationUtils.NestableFieldValidator
Declares a method for validating configuration values that is nestable.
|
Constructor and Description |
---|
ConfigValidationUtils() |
Modifier and Type | Method and Description |
---|---|
static ConfigValidationUtils.NestableFieldValidator |
fv(Class cls,
boolean notNull)
Returns a new NestableFieldValidator for a given class.
|
static ConfigValidationUtils.NestableFieldValidator |
listFv(Class cls,
boolean notNull)
Returns a new NestableFieldValidator for a List of the given Class.
|
static ConfigValidationUtils.NestableFieldValidator |
listFv(ConfigValidationUtils.NestableFieldValidator validator,
boolean notNull)
Returns a new NestableFieldValidator for a List where each item is validated by validator.
|
static ConfigValidationUtils.NestableFieldValidator |
mapFv(Class key,
Class val,
boolean notNull)
Returns a new NestableFieldValidator for a Map of key to val.
|
static ConfigValidationUtils.NestableFieldValidator |
mapFv(ConfigValidationUtils.NestableFieldValidator key,
ConfigValidationUtils.NestableFieldValidator val,
boolean notNull)
Returns a new NestableFieldValidator for a Map.
|
public static ConfigValidationUtils.NestableFieldValidator fv(Class cls, boolean notNull)
Returns a new NestableFieldValidator for a given class.
cls
- the Class the field should be a type ofnotNull
- whether or not a value of null is validpublic static ConfigValidationUtils.NestableFieldValidator listFv(Class cls, boolean notNull)
Returns a new NestableFieldValidator for a List of the given Class.
cls
- the Class of elements composing the listnotNull
- whether or not a value of null is validpublic static ConfigValidationUtils.NestableFieldValidator listFv(ConfigValidationUtils.NestableFieldValidator validator, boolean notNull)
Returns a new NestableFieldValidator for a List where each item is validated by validator.
validator
- used to validate each item in the listnotNull
- whether or not a value of null is validpublic static ConfigValidationUtils.NestableFieldValidator mapFv(Class key, Class val, boolean notNull)
Returns a new NestableFieldValidator for a Map of key to val.
key
- the Class of keys in the mapval
- the Class of values in the mapnotNull
- whether or not a value of null is validpublic static ConfigValidationUtils.NestableFieldValidator mapFv(ConfigValidationUtils.NestableFieldValidator key, ConfigValidationUtils.NestableFieldValidator val, boolean notNull)
Returns a new NestableFieldValidator for a Map.
key
- a validator for the keys in the mapval
- a validator for the values in the mapnotNull
- whether or not a value of null is validCopyright © 2019 The Apache Software Foundation. All Rights Reserved.