Skip to content

[MNG-8214] Allow extension of the model classes being generated with model.vm #9789

@jira-importer

Description

@jira-importer

Konrad Windszus opened MNG-8214 and commented

The model.vm being used with Maven 4 models generates immutable classes with builders. The generated classes cannot be extended easily because

  1. the builder's constructor is having default access instead of being protected (
    Builder(boolean withDefaults) {
    and
    Builder(${class.name} base, boolean forceCopy) {
  2. the classes constructor doesn't take a builder as argument (therefore the subclass cannot leverage most of the functionality currently encapsulated by the Builder)

Affects: 4.0.0-beta-3

Issue Links:

  • MNG-7664 consolidate Velocity templates used to generate code from models

Remote Links:

Backported to: 4.0.0-beta-4

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions