how to Call super constructor in Lombok

This is not possible in Lombok. Although it would be a really nice feature, it requires resolution to find the constructors of the super class. The super class is only known by name the moment Lombok gets invoked. Using the import statements and the classpath to find the actual class is not trivial. And during … Read more

Lombok is not generating getter and setter

When starting with a fresh eclipse installation you, in fact, need to “install” Lombok before being able to use it. Go where you Lombok jar is (e.g. (e.g. you can find in ~/.m2/repository/org/projectlombok/lombok/1.16.10/lombok-1.16.10.jar), run it (Example: java -jar lombok-1.16.10.jar). A window should appear, browse to your eclipse.exe location. Click on install. Launch Eclipse, update project … Read more

Create custom annotation for Lombok

General Considerations If you are already using Lombok, you can add custom Lombok transformation annotation and handler. Define Exists annotation with @Target(FIELD) and @Retention(SOURCE) Create a handler @ProviderFor(JavacAnnotationHandler.class) public class HandleExists extends JavacAnnotationHandler<Exists>{ …` to process your annotation. Handler class package must start with the lombok. prefix. If you need to support Eclipse, etc. in … Read more

Cannot make Project Lombok work on Eclipse

You not only have to add lombok.jar to the libraries, but also install it by either double-clicking the lombok jar, or from the command line run java -jar lombok.jar. That will show you a nice installer screen. Select your Eclipse installation and install. Afterwards, you can check if the installer has correctly modified your eclipse.ini: … Read more

How to make Lombok and AspectJ work together?

The current answer according to AspectJ maintainer Andy Clement is that there are problems due to ECJ (Eclipse Compiler for Java) packages being included and renamed in the AspectJ compiler infrastructure. For more information there is ongoing discussion between Eric B. and A. Clement on the AspectJ users mailing list: Discussion thread Discussion thread continued … Read more

How does lombok work?

Lombok does indeed code against internal API, as Sean Patrick Floyd said. However, as lombok is ONLY involved in the compilation phase, its misleading to claim Lombok will only run on a sun VM. It’ll only compile on ecj or sun’s javac. However, the vast majority of VMs out there, if they ship a compiler … Read more

Can’t compile project when I’m using Lombok under IntelliJ IDEA

I have fixed it in IDEA 12 by setting check box Enable annotation processing in: Settings -> Compiler -> Annotation Processors For IDEA 2016.2: Preferences… > Build, Execution, Deployment > Compiler > Annotation Processors After enabling, run Build -> Rebuild Project to have annotations recognized and eliminate errors. For IDEA 2019.2.1, depending on how the … Read more