Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I create a builder for an existing class that I don't control? #1499

Open
xenoterracide opened this issue Dec 29, 2023 · 1 comment
Open

Comments

@xenoterracide
Copy link

So we've got this code generated from openapi-generators. I'd like to create a builder with defaults for it. I have no control over these classes right now though. Am I able to create a Builder for this? If not could we get this ability somehow?

@elucash
Copy link
Member

elucash commented Feb 18, 2024

we have something similar for importing abstract value types (as interfaces or abstract classes) from other packages, for builders alone, for those external classes which have constructors, we have @Builder.Include(<classes>) (from org.immutables:builder maven module) placed on a package in which builders will be generated. But I don't know how to handle / communicate what has default values/what default values are

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants