public final class ReflectiveValidatorIndex extends Object implements ValidatorIndex
ReflectiveValidatorIndex uses reflection to discover Validator implementations lazily the first
time a type is validated. If no validator can be found for type, a fallback validator
will be used (default ALWAYS_VALID).ALWAYS_INVALID, ALWAYS_VALID| Constructor and Description |
|---|
ReflectiveValidatorIndex() |
ReflectiveValidatorIndex(ValidatorIndex fallbackIndex) |
| Modifier and Type | Method and Description |
|---|---|
<T> Validator<T> |
validatorFor(Class clazz)
Returns the validator for
<T>, or ALWAYS_VALID if not found. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitvalidatorForpublic ReflectiveValidatorIndex()
public ReflectiveValidatorIndex(ValidatorIndex fallbackIndex)
fallbackIndex - a ValidatorIndex implementation to use if reflective validator discovery fails.public <T> Validator<T> validatorFor(Class clazz)
<T>, or ALWAYS_VALID if not found.validatorFor in interface ValidatorIndexCopyright © 2022. All rights reserved.