本文整理了Java中javax.validation.Configuration.getDefaultConstraintValidatorFactory()
方法的一些代码示例,展示了Configuration.getDefaultConstraintValidatorFactory()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Configuration.getDefaultConstraintValidatorFactory()
方法的具体详情如下:
包路径:javax.validation.Configuration
类名称:Configuration
方法名:getDefaultConstraintValidatorFactory
[英]Returns an implementation of the ConstraintValidatorFactory interface following the default ConstraintValidatorFactory defined in the specification:
代码示例来源:origin: org.apache.tomee/openejb-core
@Override
public ConstraintValidatorFactory getDefaultConstraintValidatorFactory() {
return delegate.getDefaultConstraintValidatorFactory();
}
代码示例来源:origin: org.graniteds/granite-client-java-advanced
@Override
public ConstraintValidatorFactory getDefaultConstraintValidatorFactory() {
return configuration.getDefaultConstraintValidatorFactory();
}
代码示例来源:origin: org.apache.deltaspike.modules/deltaspike-bean-validation-module-impl
public CDIAwareConstraintValidatorFactory()
{
delegate = Validation.byDefaultProvider().configure().getDefaultConstraintValidatorFactory();
if (log.isLoggable(Level.CONFIG))
{
log.config("Setting up delegate ConstraintValidatorFactory as " +
delegate.getClass().getCanonicalName());
}
}
代码示例来源:origin: apache/deltaspike
public CDIAwareConstraintValidatorFactory()
{
delegate = Validation.byDefaultProvider().configure().getDefaultConstraintValidatorFactory();
if (log.isLoggable(Level.CONFIG))
{
log.config("Setting up delegate ConstraintValidatorFactory as " +
delegate.getClass().getCanonicalName());
}
}
代码示例来源:origin: com.googlecode.gwt-validation/gwt-validation
public void setConfiguration(Configuration<?> configuration) {
if(configuration == null) return;
this.configuration = configuration;
this.resolver = this.configuration.getDefaultTraversableResolver();
this.interpolator = this.configuration.getDefaultMessageInterpolator();
this.constraintValidatorFactory = this.configuration.getDefaultConstraintValidatorFactory();
}
代码示例来源:origin: org.hibernate.beanvalidation.tck/beanvalidation-tck-tests
@Test
@SpecAssertion(section = Sections.VALIDATIONAPI_BOOTSTRAPPING_CONFIGURATION, id = "c")
public void testDefaultConstructorInValidatorCalled() {
ConstraintValidatorFactory factory = TestUtil.getConfigurationUnderTest()
.getDefaultConstraintValidatorFactory();
factory.getInstance( MyConstraintValidator.class );
assertTrue(
MyConstraintValidator.defaultConstructorCalled,
"The no-arg default constructor should have been called."
);
}
代码示例来源:origin: org.jboss.seam.validation/seam-validation
public InjectingConstraintValidatorFactory() {
delegate = Validation.byDefaultProvider().configure().getDefaultConstraintValidatorFactory();
}
代码示例来源:origin: org.hibernate.beanvalidation.tck/beanvalidation-tck-tests
@SpecAssertion(section = Sections.VALIDATIONAPI_BOOTSTRAPPING_CONFIGURATION, id = "c")
@Test(expectedExceptions = ValidationException.class)
public void testRuntimeExceptionInValidatorCreationIsWrapped() {
ConstraintValidatorFactory factory = TestUtil.getConfigurationUnderTest()
.getDefaultConstraintValidatorFactory();
factory.getInstance( MySecondConstraintValidator.class );
}
}
内容来源于网络,如有侵权,请联系作者删除!