public abstract class ConstraintDescriptorFactory extends Object
ConstraintDescriptorImpl.
This is a workaround to support multiple versions of Hibernate Validator;
4.3.0 and greater. The problem is that ConstraintDescriptorImpl is
internal class of the Hibernate Validator and its constructor's signature
has been several times changed between major versions. The class implements
public interface ConstraintDescriptor, but its implementation is
pretty complex (547 LOC), it seems that it can't be reimplemented simpler
and I hate code copy&pasting...
| Modifier and Type | Class and Description |
|---|---|
static class |
ConstraintDescriptorFactory.UnsupportedVersionException |
| Modifier and Type | Field and Description |
|---|---|
protected Constructor<org.hibernate.validator.internal.metadata.descriptor.ConstraintDescriptorImpl> |
constructor |
| Modifier and Type | Method and Description |
|---|---|
<T extends Annotation> |
buildConstraintDescriptor(T annotation) |
static ConstraintDescriptorFactory |
newInstance()
Creates a new instance of factory for the version of Hibernate Validator
detected on classpath.
|
protected final Constructor<org.hibernate.validator.internal.metadata.descriptor.ConstraintDescriptorImpl> constructor
public static ConstraintDescriptorFactory newInstance()
public <T extends Annotation> javax.validation.metadata.ConstraintDescriptor<T> buildConstraintDescriptor(T annotation)
annotation - The constraint annotation.ConstraintDescriptorImpl for the given
constraint.Copyright © 2013–2015. All rights reserved.