org.hibernate.validator.metadata
Class ConstraintDescriptorImpl<T extends Annotation>

java.lang.Object
  extended by org.hibernate.validator.metadata.ConstraintDescriptorImpl<T>
All Implemented Interfaces:
Serializable, ConstraintDescriptor<T>

public class ConstraintDescriptorImpl<T extends Annotation>
extends Object
implements ConstraintDescriptor<T>, Serializable

Describe a single constraint (including it's composing constraints).

Author:
Emmanuel Bernard, Hardy Ferentschik, Federico Mancini, Dag Hovland
See Also:
Serialized Form

Constructor Summary
ConstraintDescriptorImpl(T annotation, ConstraintHelper constraintHelper, Class<?> implicitGroup, ElementType type, ConstraintOrigin definedOn)
           
ConstraintDescriptorImpl(T annotation, ConstraintHelper constraintHelper, ElementType type, ConstraintOrigin definedOn)
           
 
Method Summary
 boolean equals(Object o)
           
 T getAnnotation()
           
 Map<String,Object> getAttributes()
           
 Set<ConstraintDescriptor<?>> getComposingConstraints()
           
 CompositionType getCompositionType()
           
 List<Class<? extends ConstraintValidator<T,?>>> getConstraintValidatorClasses()
           
 ConstraintOrigin getDefinedOn()
           
 ElementType getElementType()
           
 Set<Class<?>> getGroups()
           
 Set<Class<? extends Payload>> getPayload()
           
 int hashCode()
           
 boolean isReportAsSingleViolation()
           
 void setCompositionType(CompositionType compositionType)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConstraintDescriptorImpl

public ConstraintDescriptorImpl(T annotation,
                                ConstraintHelper constraintHelper,
                                Class<?> implicitGroup,
                                ElementType type,
                                ConstraintOrigin definedOn)

ConstraintDescriptorImpl

public ConstraintDescriptorImpl(T annotation,
                                ConstraintHelper constraintHelper,
                                ElementType type,
                                ConstraintOrigin definedOn)
Method Detail

getAnnotation

public T getAnnotation()
Specified by:
getAnnotation in interface ConstraintDescriptor<T extends Annotation>

getGroups

public Set<Class<?>> getGroups()
Specified by:
getGroups in interface ConstraintDescriptor<T extends Annotation>

getPayload

public Set<Class<? extends Payload>> getPayload()
Specified by:
getPayload in interface ConstraintDescriptor<T extends Annotation>

getConstraintValidatorClasses

public List<Class<? extends ConstraintValidator<T,?>>> getConstraintValidatorClasses()
Specified by:
getConstraintValidatorClasses in interface ConstraintDescriptor<T extends Annotation>

getAttributes

public Map<String,Object> getAttributes()
Specified by:
getAttributes in interface ConstraintDescriptor<T extends Annotation>

getComposingConstraints

public Set<ConstraintDescriptor<?>> getComposingConstraints()
Specified by:
getComposingConstraints in interface ConstraintDescriptor<T extends Annotation>

isReportAsSingleViolation

public boolean isReportAsSingleViolation()
Specified by:
isReportAsSingleViolation in interface ConstraintDescriptor<T extends Annotation>

getElementType

public ElementType getElementType()

getDefinedOn

public ConstraintOrigin getDefinedOn()

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

setCompositionType

public void setCompositionType(CompositionType compositionType)
Parameters:
compositionType - the compositionType to set

getCompositionType

public CompositionType getCompositionType()
Returns:
the compositionType


Copyright © 2007-2011 Red Hat Middleware, LLC. All Rights Reserved