If I wanted my Scala project to be “compatible” with Java, that is make it practical to call the Scala API from Java code (so that non-Scala programmers can also contribute), would it be possible to use Project Lombok in the Java code? Or do the two of them don’t get along well?
I would be developing in Eclipse with the Scala IDE.
EDIT: What I really meant was: will the Scala editor in Eclipse see the code generated by Lombok, or just the Java code I really typed?
I’m not sure what you are asking, since Scala and Java are inter-operation in bytecode level, it doesn’t care where the bytecode come from. So I believe your Java code which use Lombok annotation is still could be called from Scala program.
And if you are asking if those annotation Lombok provide could be used in Scala code, I see no point, because most of those feature are provided by Scala itsef.
For example,a class with
@Datacould be acase classin Scala.And you could access it in Java code just like an normal class.
And
Datawill have all wonderfultoString,equals,hashcode….etc.