# projectlombok/lombok

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/projectlombok-lombok).**

13,458 stars · 2,475 forks · Java · NOASSERTION

## Links

- GitHub: https://github.com/projectlombok/lombok
- Homepage: https://projectlombok.org/
- awesome-repositories: https://awesome-repositories.com/repository/projectlombok-lombok.md

## Description

Lombok is a Java annotation processor and boilerplate reduction library designed to automatically generate repetitive source code. It intercepts the compilation process to inject methods and fields directly into Java classes, acting as a source code generator that eliminates the need to manually write common class patterns.

The project distinguishes itself through deep integration with the Java compiler and various integrated development environments. It provides IDE plugins that allow editors to recognize and navigate generated methods, preventing false compilation errors and maintaining syntax highlighting for code that only exists after the compilation phase.

Its capabilities cover the automated production of accessors, constructors, and object identity methods such as equals, hashCode, and toString. It also implements fluent builder APIs for complex objects, manages thread synchronization, simplifies checked exception handling, and injects logging boilerplate and null-check constraints.

Lombok integrates with build tools and compilers including Maven, GWT, and the Eclipse compiler to automate code generation across different environments.

## Tags

### Programming Languages & Runtimes

- [Boilerplate Reduction Patterns](https://awesome-repositories.com/f/programming-languages-runtimes/boilerplate-reduction-patterns.md) — Reduces repetitive Java code like getters, setters, and constructors using annotations to keep classes concise.
- [Java Annotation Processors](https://awesome-repositories.com/f/programming-languages-runtimes/java-annotation-processors.md) — Acts as a Java annotation processor that intercepts compilation to inject generated methods and fields.
- [Automated Constructor Generation](https://awesome-repositories.com/f/programming-languages-runtimes/automated-constructor-generation.md) — Automatically generates no-args, required-args, and all-args constructors to eliminate repetitive boilerplate. ([source](https://projectlombok.org/features/all))
- [Compiler Frontend Integrations](https://awesome-repositories.com/f/programming-languages-runtimes/compiler-frontend-integrations.md) — Adds processing capabilities to the Java compiler via the classpath to generate code during compilation. ([source](https://projectlombok.org/setup/javac))
- [Compiler Plugin Toolkits](https://awesome-repositories.com/f/programming-languages-runtimes/compiler-plugin-toolkits.md) — Hooks into the Java compiler's internal API to modify bytecode and source structure before final class files are written.
- [Java Utility Libraries](https://awesome-repositories.com/f/programming-languages-runtimes/java-utility-libraries.md) — Provides a comprehensive utility library for reducing repetitive Java boilerplate through annotations.
- [Boilerplate Object Identity Methods](https://awesome-repositories.com/f/programming-languages-runtimes/object-management/boilerplate-object-identity-methods.md) — Automatically generates standard equals, hashCode, and toString methods for consistent object comparison and logging.
- [Java Code Generators](https://awesome-repositories.com/f/programming-languages-runtimes/programming-utilities/data-structure-type-helpers/data-structures/hierarchical-tree-structures/source-code-abstract-syntax-trees/java-code-generators.md) — Generates standard Java source code from shorthand annotations by manipulating the internal compiler representation.
- [Eclipse Compiler Integration](https://awesome-repositories.com/f/programming-languages-runtimes/compiler-toolchain-integrations/eclipse-compiler-integration.md) — Enables boilerplate reduction for the standalone Eclipse compiler via an agent and classpath configuration. ([source](https://projectlombok.org/setup/ecj))
- [Extension Methods](https://awesome-repositories.com/f/programming-languages-runtimes/extension-methods.md) — Injects new methods into existing types to extend functionality without modifying original source files. ([source](https://projectlombok.org/features/experimental/all))
- [Implicit Lock Management](https://awesome-repositories.com/f/programming-languages-runtimes/implicit-lock-management.md) — Implements locking mechanisms using synchronized blocks or locks without exposing lock objects. ([source](https://projectlombok.org/features/all))
- [Java Error Handling Simplifications](https://awesome-repositories.com/f/programming-languages-runtimes/java-error-handling-simplifications.md) — Simplifies the management of try-with-resources and exception throwing to reduce verbose method signatures.
- [Maven](https://awesome-repositories.com/f/programming-languages-runtimes/language-ecosystems-tooling/programming-environments-tooling/go-environments/build-automation/maven.md) — Automates configuration files to activate the agent during Maven builds for portable environments. ([source](https://projectlombok.org/setup/ecj))
- [Source Code Generators](https://awesome-repositories.com/f/programming-languages-runtimes/source-code-generators.md) — Converts shorthand annotations into standard Java source code for compatibility with analysis tools. ([source](https://projectlombok.org/setup/maven))

### Software Engineering & Architecture

- [Accessor Generators](https://awesome-repositories.com/f/software-engineering-architecture/compile-time-code-generation/iterative-code-generation/accessor-generators.md) — Automatically generates standard getters, setters, equals, and hashCode methods to eliminate repetitive coding. ([source](https://projectlombok.org/))
- [AST Injection](https://awesome-repositories.com/f/software-engineering-architecture/abstract-syntax-tree-tools/internal-tree-representations/ast-injection.md) — Manipulates the Abstract Syntax Tree to inject methods and fields directly into the compiler's internal representation.
- [Bytecode Manipulation](https://awesome-repositories.com/f/software-engineering-architecture/bytecode-manipulation.md) — Modifies compiled class files to implement logic like synchronization and null checks without altering original source files.
- [Object Identity Method Generators](https://awesome-repositories.com/f/software-engineering-architecture/object-identity-method-generators.md) — Produces equals, hashCode, and toString implementations based on the specific fields of a class. ([source](https://projectlombok.org/features/all))
- [Checked Exception Simplification](https://awesome-repositories.com/f/software-engineering-architecture/checked-exception-simplification.md) — Allows throwing checked exceptions without requiring explicit catch blocks or method signature declarations. ([source](https://projectlombok.org/features/all))
- [Builder Patterns](https://awesome-repositories.com/f/software-engineering-architecture/creational-design-patterns/builder-patterns.md) — Implements the builder design pattern to allow flexible, step-by-step construction of complex Java objects. ([source](https://projectlombok.org/))
- [Event Logging](https://awesome-repositories.com/f/software-engineering-architecture/event-logging.md) — Injects logger fields into classes for standardized event tracking and debugging. ([source](https://projectlombok.org/features/all))
- [Null-Aware Code Generation](https://awesome-repositories.com/f/software-engineering-architecture/runtime-value-validation/null-value-validation/null-aware-code-generation.md) — Injects null checks into methods to trigger exceptions immediately when null values are encountered. ([source](https://projectlombok.org/features/all))

### Development Tools & Productivity

- [IDE Code Generation Plugins](https://awesome-repositories.com/f/development-tools-productivity/ide-code-generation-plugins.md) — Ships IDE plugins that allow editors to recognize and navigate automatically generated Java methods.
- [AST Model Synchronization](https://awesome-repositories.com/f/development-tools-productivity/ide-integrations/ast-model-synchronization.md) — Communicates with editor internal models to prevent syntax errors for methods that only exist after compilation.
- [IDE Language Plugins](https://awesome-repositories.com/f/development-tools-productivity/ide-language-plugins.md) — Provides IDE plugins that allow editors to recognize generated methods and prevent false compilation errors. ([source](https://projectlombok.org/setup/eclipse))
- [Java Development Workflow Optimizations](https://awesome-repositories.com/f/development-tools-productivity/java-development-workflow-optimizations.md) — Integrates with compilers and IDEs to automate source code generation and maintain clean class files.
- [IDE Integrations](https://awesome-repositories.com/f/development-tools-productivity/ide-integrations.md) — Configures the NetBeans editor to recognize and process annotations so generated code is available. ([source](https://projectlombok.org/setup/netbeans))
- [Logger Variable Generators](https://awesome-repositories.com/f/development-tools-productivity/logger-variable-generators.md) — Generates logging fields and boilerplate code to simplify the implementation of application logs. ([source](https://cdn.jsdelivr.net/gh/projectlombok/lombok@master/README.md))
- [Build Tool Integrations](https://awesome-repositories.com/f/development-tools-productivity/workflow-automation-tools/build-task-automation/build-tool-integrations/build-tool-integrations.md) — Integrates with standard build tools via a Java agent to enable automated code generation across environments.

### Part of an Awesome List

- [Visual Studio Plugins](https://awesome-repositories.com/f/awesome-lists/devtools/visual-studio-plugins.md) — Provides editor support for automated code generation in Visual Studio Code to ensure syntax highlighting. ([source](https://projectlombok.org/setup/vscode))

### Web Development

- [Fluent Builder APIs](https://awesome-repositories.com/f/web-development/api-bridges/browser-api-wrappers/fluent-api-wrappers/fluent-builder-apis.md) — Provides a fluent, chainable API for constructing complex objects via a single annotation. ([source](https://projectlombok.org/features/all))
- [Exception Class Generators](https://awesome-repositories.com/f/web-development/exception-handling/exception-class-generators.md) — Generates common constructors for custom exception types to ensure consistent error handling. ([source](https://projectlombok.org/features/experimental/all))
