highsource / highsource/jaxb-tools

xsd:elements defined under a xsd:choice should be correctly represented in the java class

Open
#558 6 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Java
Stars
465
Forks
105
PR merge metrics
No merged PRs in 30d

Description

Given an xsd sample:
```xsd















```

This generates a class with setters for each property. That means, we can initialize multiple fields in once object instance of Data. This should be restricted. Ideally, it should have maybe create multiple constructors which accepts only one field.
Like:
```
public Data(Null null-data)
{this.null-data=null-data;}
public Data(SeqeunceOfData array)
{this.array=array;}
```

These constructors created for each field would have the correct representation and restricts user to only initialize the Data object with one field.

[Data.txt](https://github.com/user-attachments/files/16522229/Data.txt)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.