final Class<?> theClass = instance.getClass();
return getConstraintMap(properties, defaultConstraints, theClass);
}
private static Map<String, Constrained> getConstraintMap(GrailsDomainClassProperty[] properties, Map<String, Object> defaultConstraints, Class<?> theClass) {
ConstraintsEvaluator constraintsEvaluator = GrailsFactoriesLoader.loadFactory(ConstraintsEvaluator.class, defaultConstraints);
if(constraintsEvaluator != null) {
return constraintsEvaluator.evaluate(theClass, properties);
}
return Collections.emptyMap();
}