Collection<ValidatorDescriptor> processBeanAttribute(FacesContext context, ValueDescriptor descriptor, String msg,
Class<?>... groups) {
PropertyDescriptor constraintsForProperty = getValidator(context).getConstraintsForClass(descriptor.getBeanType())
.getConstraintsForProperty(descriptor.getName());
if (null != constraintsForProperty) {
ConstraintFinder propertyConstraints = constraintsForProperty.findConstraints();
if (null != groups && groups.length > 0) {
// Filter groups, if required
propertyConstraints = propertyConstraints.unorderedAndMatchingGroups(groups);
}
Set<ConstraintDescriptor<?>> constraints = propertyConstraints // or the requested list of groups)