Skip to content

[REQ] [java] create a builder pattern for the models #18032

Description

@jpfinne

Is your feature request related to a problem? Please describe.

A good builder pattern generation can solve many issues:

  • initialize readonly values in the java generator
  • make it similar to the lombok builder that people are used to.
  • introduce immutability

Lombok can be used the generate builders. But the introduction of lombok creates more issues (#17793)

Describe the solution you'd like

Add a builder inner class
Add a static builder() method
Add a toBuilder() method

Describe alternatives you've considered

Reuse the builder from javaJAXRSServerCodeGen.
Fix the lombok generation issues.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions