Java / Lombok Interview questions
How does delombok work and when would you use it?
delombok runs Lombok's own transformation logic but, instead of feeding the result to the
compiler, writes out the fully expanded, plain-Java equivalent source code — every getter, setter,
constructor, and other generated method spelled out explicitly, with no Lombok annotations remaining.
java -jar lombok.jar delombok src/main/java -d src/main/delomboked
Common reasons to use it:
- Generating Javadoc — the standard Javadoc tool doesn't understand Lombok annotations, so running delombok first produces source Javadoc can actually process and document correctly.
- Debugging exactly what Lombok generated, without guessing from the annotation alone.
- Removing a Lombok dependency from a project — delomboking the whole codebase gives you a starting point of equivalent plain Java to work from, rather than hand-writing every generated method from scratch.
More Related questions...