private Set<Class<? extends Payload>> payload;
public ConstraintDefinition(Annotation annotation, JType type) {
Class propertyClass = GeneratorUtils.loadClass(type);
Class<? extends Annotation> annotationType = annotation.annotationType();
AnnotationWrapper wrapper = new AnnotationWrapper(annotation);
attributes = new AnnotationAttributes(annotation);
groups = createClassSet((Class[]) wrapper.getValue("groups"));
if (groups.isEmpty()) {
groups.add(Default.class);
}
groups = GroupUtils.expandGroups(groups);
payload = createClassSet((Class[]) wrapper.getValue("payload"));
message = new Message(wrapper.getString("message"));
// resolving the validator class
Constraint constraint = annotationType.getAnnotation(Constraint.class);
Class<? extends ConstraintValidator<?, ?>>[] validatorClasses = constraint.validatedBy();
if (validatorClasses.length == 0) {