Does there exist a Java library with an API for generating a java source file?
Posted on 2011-10-26
I know there are many different source code generators out there. Most use XML or some structured text as a template. I am looking for a library that has an API for constructing simple java class sources...
JavaSourceBuilder builder = new JavaSourceBuilder(Type.CLASS);
builder.addField(new FieldBuilder(Modifier.PRIVATE, String.class, "name"));