Reputation: 164
Can we use lombok framework in embedded Java? Like midlets or implementations where we need only core java.
Upvotes: 1
Views: 883
Reputation: 34452
Yes, I expect that you can use lombok in embedded Java.
Lombok is a compile time dependency, and not related to any deployment platform.
You might want to modify lombok.config
and instruct lombok to not generate @ConstructorProperties
using lombok.anyConstructor.suppressConstructorProperties=true
(in the upcoming release, this will be the default behavior and deprecated), since I expect that that is not available at runtime.
Also, the generated code is optimized for hotspot, so you might also want to configure lombok.equalsAndHashCode.doNotUseGetters=true
and lombok.toString.doNotUseGetters=true
to use direct field access instead of getters.
Disclosure: I am a lombok developer.
Upvotes: 1