Top Description Methods
jakarta.validation

public Interface ConstraintValidatorFactory


Instantiates a ConstraintValidator instance based off its class. The ConstraintValidatorFactory is not responsible for calling ConstraintValidator#initialize(java.lang.annotation.Annotation).
Authors
Dhanji R. Prasanna, Emmanuel Bernard, Hardy Ferentschik

Method Summary

Modifier and TypeMethod and Description
public <
The type of the constraint validator to instantiate
T extends ConstraintValidator<?, ?>
>
T

Returns:

A new constraint validator instance of the specified class
getInstance
(Class<T>
The class of the constraint validator to instantiate
key
)

public void
releaseInstance(ConstraintValidator<?, ?>
validator being released
instance
)

Signals ConstraintValidatorFactory that the instance is no longer being used by the Jakarta Validation provider.

Method Detail

getInstanceback to summary
public <T extends ConstraintValidator<?, ?>> T getInstance(Class<T> key)
Parameters
<T>
The type of the constraint validator to instantiate
key:Class<T>

The class of the constraint validator to instantiate

Returns:T

A new constraint validator instance of the specified class

releaseInstanceback to summary
public void releaseInstance(ConstraintValidator<?, ?> instance)

Signals ConstraintValidatorFactory that the instance is no longer being used by the Jakarta Validation provider.

Parameters
instance:ConstraintValidator<?, ?>

validator being released

Since
1.1