Skip to content
This repository was archived by the owner on Sep 21, 2022. It is now read-only.
This repository was archived by the owner on Sep 21, 2022. It is now read-only.

Improve value-constructor plugin to use only elements with minOccurs greater than 0 with no default value and only required attributes #11

Open
@glassfishrobot

Description

@glassfishrobot

Currently, the value constructor plugin generates a fully initializing
constructor with all elements and attributes.

Client codes that use these constructors will break when a new optional element
or attribute is added to the schema.

A better solution is to generate a partially initializing constructors with only
elements that have minOccurs greater than 0 and with no default value and
required attributes.

It'd be better to use the default-value-plugin to provide default values.

Alex Wei

Environment

Operating System: All
Platform: All

Affected Versions

[current]

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions