public <T> Set<ConstraintViolation<T>> validateValue(Class<T> beanType, String propertyName, Object value, Class<?>... groups) {
return this.validateValue(new HashSet<Class<?>>(), beanType, propertyName, value, groups);
}
private <T> Set<ConstraintViolation<T>> validateValue(Set<Class<?>> previousGroups, Class<T> beanType, String propertyName, Object value, Class<?>... groups) {
IReflector reflector = ReflectorFactory.INSTANCE.getReflector(beanType);
Set<ConstraintViolation<T>> violations = new HashSet<ConstraintViolation<T>>();
for(Class<?> group : reflector.getGroupSequence()) {
if(previousGroups.contains(group)) {
throw new GroupDefinitionException("The group sequence on " + beanType.getName() + " already contains " + group.getName() + ". Definitions may not be cyclic or circular");
}
violations.addAll(this.coreValidator.validateValue(beanType, propertyName, group));