Top Description Methods
jakarta.validation.spi

public Interface ValidationProvider<T extends jakarta.validation.Configuration<T>>

Type Parameters
<T>
the provider specific Configuration subclass which typically host provider's additional configuration methods
Imports
jakarta.validation.Configuration, .ValidationException, .ValidationProviderResolver, .ValidatorFactory

Contract between the validation bootstrap mechanism and the provider engine.

Implementations must have a public no-arg constructor. The construction of a provider should be as "lightweight" as possible.

Authors
Emmanuel Bernard, Hardy Ferentschik

Method Summary

Modifier and TypeMethod and Description
public ValidatorFactory

Returns:

the instantiated ValidatorFactory
buildValidatorFactory
(ConfigurationState
the configuration descriptor
configurationState
)

Build a ValidatorFactory using the current provider implementation.

public Configuration<?>

Returns:

non specialized Configuration implementation
createGenericConfiguration
(BootstrapState
bootstrap state
state
)

Returns a Configuration instance.

public T

Returns:

specific Configuration implementation
createSpecializedConfiguration
(BootstrapState
bootstrap state
state
)

Returns a Configuration instance implementing T, the Configuration sub-interface.

Method Detail

buildValidatorFactoryback to summary
public ValidatorFactory buildValidatorFactory(ConfigurationState configurationState)

Build a ValidatorFactory using the current provider implementation.

The ValidatorFactory is assembled and follows the configuration passed via ConfigurationState.

The returned ValidatorFactory is properly initialized and ready for use.

Parameters
configurationState:ConfigurationState

the configuration descriptor

Returns:ValidatorFactory

the instantiated ValidatorFactory

Exceptions
ValidationException:
if the ValidatorFactory cannot be built
createGenericConfigurationback to summary
public Configuration<?> createGenericConfiguration(BootstrapState state)

Returns a Configuration instance. This instance is not bound to use the current provider. The choice of provider follows the algorithm described in Configuration

The ValidationProviderResolver used by Configuration is provided by state. If null, the default ValidationProviderResolver is used.

Parameters
state:BootstrapState

bootstrap state

Returns:Configuration<?>

non specialized Configuration implementation

createSpecializedConfigurationback to summary
public T createSpecializedConfiguration(BootstrapState state)

Returns a Configuration instance implementing T, the Configuration sub-interface. The returned Configuration instance must use the current provider (this) to build the ValidatorFactory instance.

Parameters
state:BootstrapState

bootstrap state

Returns:T

specific Configuration implementation