use of jakarta.validation.BootstrapConfiguration in project hibernate-validator by hibernate.
the class ValidatorFactoryBean method createValidationXmlValueExtractors.
private Set<ValueExtractorDescriptor> createValidationXmlValueExtractors(Configuration<?> config) {
BootstrapConfiguration bootstrapConfiguration = config.getBootstrapConfiguration();
Set<String> valueExtractorFqcns = bootstrapConfiguration.getValueExtractorClassNames();
@SuppressWarnings("unchecked") Set<ValueExtractorDescriptor> valueExtractorDescriptors = valueExtractorFqcns.stream().map(fqcn -> createInstance((Class<? extends ValueExtractor<?>>) run(LoadClass.action(fqcn, null)))).map(ve -> new ValueExtractorDescriptor(ve)).collect(Collectors.toSet());
return valueExtractorDescriptors;
}
use of jakarta.validation.BootstrapConfiguration in project hibernate-validator by hibernate.
the class ValidatorFactoryBean method createClockProvider.
private ClockProvider createClockProvider(Configuration<?> config) {
BootstrapConfiguration bootstrapConfiguration = config.getBootstrapConfiguration();
String clockProviderFqcn = bootstrapConfiguration.getClockProviderClassName();
if (clockProviderFqcn == null) {
return config.getDefaultClockProvider();
}
@SuppressWarnings("unchecked") Class<? extends ClockProvider> clockProviderClass = (Class<? extends ClockProvider>) run(LoadClass.action(clockProviderFqcn, null));
return createInstance(clockProviderClass);
}
use of jakarta.validation.BootstrapConfiguration in project hibernate-validator by hibernate.
the class ValidatorFactoryBean method createTraversableResolver.
private TraversableResolver createTraversableResolver(Configuration<?> config) {
BootstrapConfiguration bootstrapConfiguration = config.getBootstrapConfiguration();
String traversableResolverFqcn = bootstrapConfiguration.getTraversableResolverClassName();
if (traversableResolverFqcn == null) {
return config.getDefaultTraversableResolver();
}
@SuppressWarnings("unchecked") Class<? extends TraversableResolver> traversableResolverClass = (Class<? extends TraversableResolver>) run(LoadClass.action(traversableResolverFqcn, null));
return createInstance(traversableResolverClass);
}
use of jakarta.validation.BootstrapConfiguration in project hibernate-validator by hibernate.
the class ValidatorFactoryBean method createMessageInterpolator.
private MessageInterpolator createMessageInterpolator(Configuration<?> config) {
BootstrapConfiguration bootstrapConfiguration = config.getBootstrapConfiguration();
String messageInterpolatorFqcn = bootstrapConfiguration.getMessageInterpolatorClassName();
if (messageInterpolatorFqcn == null) {
return config.getDefaultMessageInterpolator();
}
@SuppressWarnings("unchecked") Class<? extends MessageInterpolator> messageInterpolatorClass = (Class<? extends MessageInterpolator>) run(LoadClass.action(messageInterpolatorFqcn, null));
return createInstance(messageInterpolatorClass);
}
use of jakarta.validation.BootstrapConfiguration in project hibernate-validator by hibernate.
the class ValidatorFactoryBean method createParameterNameProvider.
private ParameterNameProvider createParameterNameProvider(Configuration<?> config) {
BootstrapConfiguration bootstrapConfiguration = config.getBootstrapConfiguration();
String parameterNameProviderFqcn = bootstrapConfiguration.getParameterNameProviderClassName();
if (parameterNameProviderFqcn == null) {
return config.getDefaultParameterNameProvider();
}
@SuppressWarnings("unchecked") Class<? extends ParameterNameProvider> parameterNameProviderClass = (Class<? extends ParameterNameProvider>) run(LoadClass.action(parameterNameProviderFqcn, null));
return createInstance(parameterNameProviderClass);
}
Aggregations