phax / jcodemodel

A heavily extended fork of the com.sun.codemodel (from 2013/09)
Other
93 stars 34 forks source link

[lib] use lombok ? #95

Closed glelouet closed 3 years ago

glelouet commented 3 years ago

I propose to use lombok for the following reasons :

in a lot of code, you have @NonNull , in parameters or in result. Then if as parameter, you must make validation test. Lombok does that for you.

There is a lot of code that is repeated getters/setters with null test. Just create the private field and annotate it with @getter, @setter and lombok will add the methods. https://projectlombok.org/features/GetterSetter

It's a annotationprocessor so not imported into the jar. It really just works by adding methods at compile - nothing more.

Just trying to simplify the code by adding the lib, doing a branch will link later.

glelouet commented 3 years ago

The little issue is that you then need to name your field the way you want to make the generated methods.

eg in a JConditional you need to rename m_aTestExpr as "test", so that you still have getTest() and setTest()

phax commented 3 years ago

Please don't use Lombok. I only want code that is Wysiwyg

glelouet commented 3 years ago

k.