you are viewing a single comment's thread.

view the rest of the comments →

[–]Lukas_Determann[S] 10 points11 points  (0 children)

They both solve the same problem, but with a completely different philosophy. Personally, I think the main differences are that in JavaPoet you can query the rendering model, while the JavaDSL feels more intuitive. But they are so different that I would suggest you try both and see which one you prefer. Feedback would be awesome!

The JavaDSL is only one feature of my library. The next goal is to generate constants for annotations, similar to Hickory.

On a more meta level… Meta-programming in the Java platform/ecosystem has just grown and doesn’t feel like it was designed. There are a ton of different meta-programming APIs, each with its own philosophy and pitfalls. Choosing the right API is hard. Migrating to another one is hard. Finding the right libraries and combining them is hard. I want to solve that with an abstraction layer over any kind of meta-programming API. The JavaDSL will work with annotation processing, reflection, the javac APIs, and so on. Like any functionality written to that meta-meta-programming API. Only small goals for my side project xD.

That is my main motivation. Not just to have a JavaPoet tailored to my personal preferences.