Skip to content

Commit dcc06cf

Browse files
committed
docs: Number README sections.
Signed-off-by: Manoel Campos <manoelcampos@gmail.com>
1 parent 6ac9118 commit dcc06cf

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
A tiny Maven Plugin that uses [bytecode manipulation](https://github.com/raphw/byte-buddy) to provide automatic implementation of accessors in classes. You can make your class attributes public and the plugin will replace read and write access to them with calls to the corresponding getter and setter method (if existing).
44

5-
## Usage
5+
## 1. Usage
66

77
Add the plugin inside the `<build><plugins>` tag of your project's `pom.xml` file:
88

@@ -71,7 +71,7 @@ public class Main {
7171

7272
You can confirm that by opening the `Main.class` compiled file inside some IDE.
7373

74-
## Motivation
74+
## 2. Motivation
7575

7676
JDK 16 introduced the [record type](https://openjdk.org/jeps/395), which are shallowly-immutable classes providing automatic getters and other utilities. However, [records cannot be fully used as JPA entities](https://thorben-janssen.com/java-records-hibernate-jpa/#records-cant-be-entities).
7777

@@ -84,7 +84,7 @@ Boot;
8484
- and when the project uses multiple annotation processors, usually we need to [ensure that Lombok is executed first](https://github.com/projectlombok/lombok/issues/973#issuecomment-2537613474).
8585

8686

87-
## How the plugin is different from Lombok
87+
## 3. How the plugin is different from Lombok
8888

8989
Lombok and this plugin perform bytecode manipulation during your project build.
9090
However, Lombok usually adds new methods that you'll call directly (such as getters and setters).
@@ -124,7 +124,7 @@ This way, even if you remove the plugin, your code still compiles (despite it ma
124124
That simplifies the build process and avoid Lombok issues that always happen when opening the project on some IDE (even those which have default support for it).
125125
Who haven't sometime opened a project on IntelliJ and got a lot of errors because of Lombok?
126126

127-
## How to remove the plugin
127+
## 4. How to remove the plugin
128128

129129
In order to the plugin from the pom.xml is enough to delete it from your project's pom.xml file.
130130
Your project will continue building, despite you may not have the same behaviour/results as before.
@@ -133,7 +133,7 @@ you'll need to explicitly call them after removing the plugin.
133133

134134
You can automatically do that in your entire project by using the [OpenRewrite tool](https://github.com/openrewrite/rewrite), [which has a Maven Plugin as well](https://docs.openrewrite.org).
135135

136-
## Plans for future
136+
## 5. Plans for future
137137

138138
Lombok has some great features. Any feature that just changes existing methods (instead of introducing brand-new ones that you explicitly call) can be implemented.
139139
Some of them are methods from the `Object` class, such as `toString()`, `equals()`, `hashCode()` etc.

0 commit comments

Comments
 (0)