org.hibernate.validator.metadata
Class MetaConstraint<A extends java.lang.annotation.Annotation>
java.lang.Object
org.hibernate.validator.metadata.MetaConstraint<A>
- Direct Known Subclasses:
- BeanMetaConstraint, MethodMetaConstraint
public abstract class MetaConstraint<A extends java.lang.annotation.Annotation>
- extends java.lang.Object
Instances of this class abstract the constraint type (class, method or field constraint) and give access to
meta data about the constraint. This allows a unified handling of constraints in the validator implementation.
- Author:
- Hardy Ferentschik, Gunnar Morling
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
location
protected final ConstraintLocation location
- The location at which this constraint is defined.
MetaConstraint
public MetaConstraint(ConstraintDescriptorImpl<A> constraintDescriptor,
ConstraintLocation location)
- Parameters:
constraintDescriptor - The constraint descriptor for this constraintlocation - meta data about constraint placement
getGroupList
public final java.util.Set<java.lang.Class<?>> getGroupList()
- Returns:
- Returns the list of groups this constraint is part of. This might include the default group even when
it is not explicitly specified, but part of the redefined default group list of the hosting bean.
getDescriptor
public final ConstraintDescriptorImpl<A> getDescriptor()
getElementType
public final java.lang.annotation.ElementType getElementType()
validateConstraint
public <T,U,V> boolean validateConstraint(ValidationContext<T,?> executionContext,
ValueContext<U,V> valueContext)
getLocation
public ConstraintLocation getLocation()
typeOfAnnotatedElement
protected final java.lang.reflect.Type typeOfAnnotatedElement()
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
Copyright © 2011 Oracle Corporation. All Rights Reserved.