public class ConfigValidationAnnotations extends Object
Note: every annotation interface must have method validatorClass() For every annotation there must validator class to do the validation To add another annotation for config validation, add another annotation @interface class. Implement the corresponding validator logic in a class in ConfigValidation. Make sure validateField method in ConfigValidation knows how to use the validator and which method definition/parameters to pass in based on what fields are in the annotation. By default, params of annotations will be passed into a constructor that takes a Map as a parameter.
| Modifier and Type | Class and Description | 
|---|---|
| static interface  | ConfigValidationAnnotations.CustomValidatorFor custom validators. | 
| static interface  | ConfigValidationAnnotations.IsBoolean | 
| static interface  | ConfigValidationAnnotations.IsDerivedFrom | 
| static interface  | ConfigValidationAnnotations.IsImplementationOfClass | 
| static interface  | ConfigValidationAnnotations.IsInteger | 
| static interface  | ConfigValidationAnnotations.IsKryoReg | 
| static interface  | ConfigValidationAnnotations.IsListEntryCustomValidates each entry in a list with a list of validators Validators with fields: validatorClass and entryValidatorClass. | 
| static interface  | ConfigValidationAnnotations.IsListEntryTypevalidates each entry in a list is of a certain type. | 
| static interface  | ConfigValidationAnnotations.IsMapEntryCustomValidates a each key and value in a Map with a list of validators Validator with fields: validatorClass, keyValidatorClasses, valueValidatorClasses. | 
| static interface  | ConfigValidationAnnotations.IsMapEntryTypeValidates the type of each key and value in a map Validator with fields: validatorClass, keyValidatorClass, valueValidatorClass. | 
| static interface  | ConfigValidationAnnotations.IsNoDuplicateInListValidates that there are no duplicates in a list. | 
| static interface  | ConfigValidationAnnotations.IsNumber | 
| static interface  | ConfigValidationAnnotations.IsPositiveNumberChecks if a number is positive and whether zero inclusive Validator with fields: validatorClass, includeZero. | 
| static interface  | ConfigValidationAnnotations.IsPowerOf2 | 
| static interface  | ConfigValidationAnnotations.IsStringValidators with fields: validatorClass. | 
| static interface  | ConfigValidationAnnotations.IsStringList | 
| static interface  | ConfigValidationAnnotations.IsStringOrStringListComplex/custom type validators. | 
| static interface  | ConfigValidationAnnotations.IsTypeValidators with fields: validatorClass and type. | 
| static interface  | ConfigValidationAnnotations.NotNullValidates on object is not null. | 
| static interface  | ConfigValidationAnnotations.Password | 
| static class  | ConfigValidationAnnotations.ValidatorParamsField names for annotations. | 
| Constructor and Description | 
|---|
| ConfigValidationAnnotations() | 
Copyright © 2022 The Apache Software Foundation. All rights reserved.