Reputation: 13471
Anybody know if in Java there´s something like Scala macro
to interact with the javac in compilation time. Reflection
it´s quite powerful, but only works on runtime.
Upvotes: 0
Views: 196
Reputation: 51693
In Java there are no macros like in Scala but there is kind of macros like in C++.
Can I have macros in Java source files
There are also
Manifold http://manifold.systems/ https://github.com/manifold-systems/manifold
Spoon https://spoon.gforge.inria.fr/ https://github.com/INRIA/spoon
compile-time annotation processing Is there a way to create custom annotations in Scala and write a custom annotation processor to verify the annotations?
Lombok https://projectlombok.org/ https://github.com/projectlombok/lombok
Upvotes: 3