final Annotation<JavaClassSource> constraintAnnotation = addConstraintOnProperty(property, onAccessor,
NotNull.class,
message);
JavaSourceFacet javaSourceFacet = project.getFacet(JavaSourceFacet.class);
javaSourceFacet.saveJavaSource(constraintAnnotation.getOrigin());
}
public void addMinConstraint(Project project, JavaClassSource klass, String propertyName, boolean onAccessor,
String message, String min)
throws FileNotFoundException