Class MetaConstraint<A extends Annotation>
- java.lang.Object
-
- org.hibernate.validator.internal.metadata.core.MetaConstraint<A>
-
public class MetaConstraint<A extends Annotation> extends 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, Guillaume Smet
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)ConstraintLocation.ConstraintLocationKindgetConstraintLocationKind()ConstraintDescriptorImpl<A>getDescriptor()Set<Class<?>>getGroupList()ConstraintLocationgetLocation()inthashCode()booleanisDefinedForOneGroupOnly()StringtoString()booleanvalidateConstraint(ValidationContext<?> validationContext, ValueContext<?,Object> valueContext)
-
-
-
Method Detail
-
getGroupList
public final Set<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.
-
isDefinedForOneGroupOnly
public final boolean isDefinedForOneGroupOnly()
-
getDescriptor
public final ConstraintDescriptorImpl<A> getDescriptor()
-
getConstraintLocationKind
public final ConstraintLocation.ConstraintLocationKind getConstraintLocationKind()
-
validateConstraint
public boolean validateConstraint(ValidationContext<?> validationContext, ValueContext<?,Object> valueContext)
-
getLocation
public ConstraintLocation getLocation()
-
-