# Lombok

<br>

### What is Lombok?

: A library that allows you to easily generate boilerplate code such as Constructors, Getters/Setters, toString(), etc. through annotations when creating Model Objects like DTOs, VOs, Entities in Java

<br>

Of course, you can easily generate them using the auto-generation feature of IDEs like Eclipse, but if a variable name changes, you have to update the corresponding functions like getters/setters as well, which is inconvenient

-> Lombok annotations solve this inconvenience

\ <br>

### How to Use

<br>

\- `@Data`

​ : Generates all the annotations listed below at once\
\
\- `@ToString`

​ : Generates a toString() method that prints all fields\
\
\- `@Getter`

​ : Generates Getter methods\
\
\- `@Setter`

​ : Generates Setter methods\
\
\- `@EqualsAndHashCode`

​ : Generates equals & hashcode methods\
\
\- `@NoArgsConstructor`

​ : Generates a constructor with no arguments\ <br>

\- `@RequiredArgsConstructor`

​ : Generates a constructor with only required arguments\ <br>

\- `@AllArgsConstructor`

​ : Generates a constructor with all arguments

\ <br>

### Usage Example

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://chloe-codes1.gitbook.io/til/java/java-advanced/00_lombok.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
