mkarneim / pojobuilder

A Java Code Generator for Pojo Builders
Other
334 stars 44 forks source link

Making the "clone()" and "but()" methods generation optional #159

Open edouardmercier opened 5 years ago

edouardmercier commented 5 years ago

What to do you of adding a new attribute to the GeneratePojoBuilder which indicates whether the clone() and but() should be generated? I think that an enumerated type for that extra attribute, which would enable further customisation by the way, is a good candidate, and the induced complexity of the code generation change should be straightforward.

In my case, I'm using a transpiler to generate JavaScript subsequently, and having those methods bloats the generated code, and exposes non-working code, since the clone() method is not ported.

I am referring to v4.2.2.