javax.validation.metadata
Interface ElementDescriptor

All Known Subinterfaces:
BeanDescriptor, PropertyDescriptor

public interface ElementDescriptor

Describes a validated element (class, field or property).

Author:
Emmanuel Bernard, Hardy Ferentschik

Method Summary
 java.util.Set<ConstraintDescriptor<?>> getConstraintDescriptors()
          Return all constraint descriptors for this element or an empty Set if none are present.
 java.lang.Class<?> getElementClass()
           
 java.util.Set<ConstraintDescriptor<?>> getUnorderedConstraintDescriptorsMatchingGroups(java.lang.Class<?>... groups)
          Return the list of matching constraints for a given set of groups for this element.
 boolean hasConstraints()
           
 

Method Detail

hasConstraints

boolean hasConstraints()
Returns:
true if at least one constraint declaration is present on the element, false otherwise.

getElementClass

java.lang.Class<?> getElementClass()
Returns:
Statically defined returned type.

getConstraintDescriptors

java.util.Set<ConstraintDescriptor<?>> getConstraintDescriptors()
Return all constraint descriptors for this element or an empty Set if none are present.

Returns:
Set of constraint descriptors for this element

getUnorderedConstraintDescriptorsMatchingGroups

java.util.Set<ConstraintDescriptor<?>> getUnorderedConstraintDescriptorsMatchingGroups(java.lang.Class<?>... groups)
Return the list of matching constraints for a given set of groups for this element. This method respects group sequences and group inheritance (including class-level Default group overriding) but does not return ConstraintDescriptors in any particular order. Specifically, ordering of the group sequence is not respected.

Parameters:
groups - groups targeted
Returns:
list of matching ConstraintDescriptors


Copyright © 2007-2009. All Rights Reserved.