Java / Lombok Interview questions
How do you install the Lombok plugin in an IDE?
Because Lombok's generated methods don't exist in your actual source file, an IDE that only parses the source as written would show errors for calls to getters/setters that "don't exist" — the IDE plugin teaches the IDE's own code analysis to understand Lombok's annotations and treat the generated methods as if they were really there.
// IntelliJ IDEA: Settings/Preferences -> Plugins -> search "Lombok" -> Install -> restart IDE // Eclipse: download lombok.jar, run `java -jar lombok.jar`, point it at your Eclipse install
Most modern IDEs (IntelliJ IDEA, Eclipse, VS Code with the Java extension pack) have dedicated Lombok
support available as a plugin or built-in feature. Without it installed, the project can still compile
correctly from the command line (since javac itself runs the annotation processor regardless),
but the IDE's editor will show false "cannot find symbol" errors and won't offer code completion for the
generated methods.
More Related questions...