private static class SourceConstraintDescriptorGenerator extends AbstractConstraintDescriptorGenerator<ClassDescriptor> {
@Override
protected ClassDescriptor create(ConstraintMetadata metadata) {
//class descriptor
ClassDescriptor descriptor = new ClassDescriptor();
//uuid
UUID uuid = UUID.randomUUID();
String uuidString = uuid.toString();
uuidString = uuidString.replaceAll("\\-","");
//create generation target annotation name
String generatedConstraintName = ConstraintDescriptionGenerator.INSTANCE.getClassPrefix() + "_" + uuidString;
String fullGeneratedConstraintName = ConstraintDescriptionGenerator.INSTANCE.getTargetPackage() + "." +generatedConstraintName;
//generate constraint descriptor
descriptor.setFullClassName(fullGeneratedConstraintName);
descriptor.setClassName(generatedConstraintName);
descriptor.setPackageName(ConstraintDescriptionGenerator.INSTANCE.getTargetPackage());
return descriptor;
}