You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.
Another type, Type2, is defined as en extension of Type1.
Type1 is built by itself, first, using fluent API, and with JAXB episode generation enabled.
Then we try to build Type2 in another step, still using fluent API, and providing the episode file generated before.
When doing this, Type2 will be missing all the with___ methods related to the setters of Type1; which it gets correctly if everything is generated in a single step.
The text was updated successfully, but these errors were encountered:
In FluentApiPlugin.java, line 140, we navigate to the super class to be able to handle its setters as well.
However, the javadoc for xjc ClassOutline specifies that the getSuperClass method, used by this plugin, may return null if the super class is not JAXB-bound.
I'm not sure what "JAXB-bound" specifically means in this context, but I guess that if the parent class was resolved by episode, it probably isn't opened in XJC's context and we get null.
Does this analysis seem correct ?
And if so, any idea about fixing the issue ?
This shows that when a type is bound to a user-specified class (as is the case when building with episodes), a new dummy, empty, hidden JDefinedClass is instantiated to represent that type.
So getSuperClass is not returning null; it's returning a dummy empty class, hence why we don't read any setter from it.
I don't think it's actually fixable from inside this plugin's code though : any solution to that issue would probably require :
Passing the pre-compiled .java or .class files to XJC, along with the episode
Implement in XJC the ability to create a detailed JDefinedClass from these files, rather than a dummy empty one.
So I guess you could close this ticket as wontfix... I'm still open to any suggestion for this issue though.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Use case is the following :
When doing this, Type2 will be missing all the with___ methods related to the setters of Type1; which it gets correctly if everything is generated in a single step.
The text was updated successfully, but these errors were encountered: