}
}
private Class<?>[] determineGroupsToUse(Object pojo) {
if (pojo instanceof ValidationGroupsProvider) {
ValidationGroupsProvider groupsProvider = (ValidationGroupsProvider) pojo;
return groupsProvider.groupsToValidate();
}
else {
return ValidationGroupsProvider.DEFAULT_GROUP;
}
}