return getUnorderedConstraintDescriptorsMatchingGroups( groups );
}
public Set<ConstraintDescriptor<?>> getUnorderedConstraintDescriptorsMatchingGroups(Class<?>... groups) {
Set<ConstraintDescriptor<?>> matchingDescriptors = new HashSet<ConstraintDescriptor<?>>();
GroupChain groupChain = new GroupChainGenerator().getGroupChainFor( Arrays.asList( groups ) );
Iterator<Group> groupIterator = groupChain.getGroupIterator();
while ( groupIterator.hasNext() ) {
Group g = groupIterator.next();
addMatchingDescriptorsForGroup( g.getGroup(), matchingDescriptors );
}
return Collections.unmodifiableSet( matchingDescriptors );