---
title: "Discussion on \"Can you use Lombok toBuilder on an Abstract Class?\" | Hashnode"
description: "Discussion on \"Can you use Lombok toBuilder on an Abstract Class?\". Yes, you can, and you just need an additional line of code in the Abstract Class. Let's take a look at how we can do so.\nContext\nIf you have an abstract class with various subclasses, and you need to define some values through builder method, you won..."
url: "https://hashnode.com/posts/can-you-use-lombok-tobuilder-on-an-abstract-class/63ae9cad7848f79f3917f12f"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Can you use Lombok toBuilder on an Abstract Class?](https://bwgjoseph.com/can-you-use-lombok-tobuilder-on-an-abstract-class?utm_source=hashnode&utm_medium=feed)

Yes, you can, and you just need an additional line of code in the Abstract Class. Let's take a look at how we can do so. Context If you have an abstract class with various subclasses, and you need to define some values through builder method, you won...

Dec 30, 2022 · 2 min read · bwgjoseph.com  
Read the article

-   [#lombok](https://hashnode.com/tag/lombok)
-   [#java](https://hashnode.com/tag/java)
-   [#inheritance](https://hashnode.com/tag/inheritance)
-   [#builder-pattern](https://hashnode.com/tag/builder-pattern)

## Written by

[Joseph Gan](https://hashnode.com/@bwgjoseph)

@bwgjoseph · Singapore

  
[View profile](https://hashnode.com/@bwgjoseph)

Advocate for better developer's productivity and experience Documenting my learnings and sharing it

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
