Top Description Methods
jakarta.validation.bootstrap

public Interface GenericBootstrap

Known Direct Implementers
jakarta.validation.Validation.GenericBootstrapImpl
Imports
jakarta.validation.Configuration, .NoProviderFoundException, .ValidationException, .ValidationProviderResolver, .ValidatorFactory

Defines the state used to bootstrap Jakarta Validation and creates a provider agnostic Configuration.
Author
Emmanuel Bernard

Method Summary

Modifier and TypeMethod and Description
public Configuration<?>

Returns:

a Configuration implementation compliant with the bootstrap state
configure
()

Returns a generic Configuration implementation.

public GenericBootstrap

Returns:

this following the chaining method pattern
providerResolver
(ValidationProviderResolver
the ValidationProviderResolver to use for bootstrapping
resolver
)

Defines the provider resolution strategy.

Method Detail

configureback to summary
public Configuration<?> configure()

Returns a generic Configuration implementation. At this stage the provider used to build the ValidatorFactory is not defined.

The Configuration implementation is provided by the first provider returned by the ValidationProviderResolver strategy.

Returns:Configuration<?>

a Configuration implementation compliant with the bootstrap state

Exceptions
NoProviderFoundException:
if no Jakarta Validation provider was found
ValidationException:
if a Jakarta Validation provider was found but the Configuration object cannot be built; this is generally due to an issue with the ValidationProviderResolver
providerResolverback to summary
public GenericBootstrap providerResolver(ValidationProviderResolver resolver)

Defines the provider resolution strategy. This resolver returns the list of providers evaluated to build the Configuration.

If no resolver is defined, the default ValidationProviderResolver implementation is used.

Parameters
resolver:ValidationProviderResolver

the ValidationProviderResolver to use for bootstrapping

Returns:GenericBootstrap

this following the chaining method pattern