All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.dropwizard.jersey.validation.MutableValidatorFactory Maven / Gradle / Ivy

The newest version!
package io.dropwizard.jersey.validation;

import jakarta.validation.ConstraintValidator;
import jakarta.validation.ConstraintValidatorFactory;
import org.hibernate.validator.internal.engine.constraintvalidation.ConstraintValidatorFactoryImpl;

/**
 * @since 2.0
 */
public class MutableValidatorFactory implements ConstraintValidatorFactory {

    private ConstraintValidatorFactory validatorFactory = new ConstraintValidatorFactoryImpl();

    @Override
    public final > T getInstance(Class key) {
        return validatorFactory.getInstance(key);
    }

    @Override
    public void releaseInstance(ConstraintValidator instance) {
        // Nothing to do
    }

    public void setValidatorFactory(ConstraintValidatorFactory validatorFactory) {
        this.validatorFactory = validatorFactory;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy