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
As an extension of the closed issue #361, I tried using javaType in my parent class Device.json. This worked as expected in creating the Device.java and Spec.java file. But the class files are messed up.
I got
target/java-gen/mypackage
-->Device.java (Has a class variable 'components' of type 'Spec')
-->Spec.java
target/classes/mypackage
-->Device.class
-->Spec.class
-->Spec_.class (This is not referenced in any class)
Initially I didn't mind the extra Spec_.class, but for some weird reason I am not able to use the getter and setter in the Spec.class (Although there are public getter and setters in Spec and Spec_). However I am able to use getter and setter in Spec_.class. Now I am wondering if Spec.class was not generated properly.
This problem is only in the class file generated and not in the Device.java and Spec.java files.
Is this a bug or am I missing something in reference to javaType?
The text was updated successfully, but these errors were encountered:
javaType can be used to reuse existing classes from the classpath, but in this case you're instructing the plugin to generate two new classes but have the same FQCN for both. The plugin can't do this, so it attempts to disambiguate the names using an underscore.
As an extension of the closed issue #361, I tried using javaType in my parent class Device.json. This worked as expected in creating the Device.java and Spec.java file. But the class files are messed up.
I got
target/java-gen/mypackage
-->Device.java (Has a class variable 'components' of type 'Spec')
-->Spec.java
target/classes/mypackage
-->Device.class
-->Spec.class
-->Spec_.class (This is not referenced in any class)
My Device.json:
Initially I didn't mind the extra Spec_.class, but for some weird reason I am not able to use the getter and setter in the Spec.class (Although there are public getter and setters in Spec and Spec_). However I am able to use getter and setter in Spec_.class. Now I am wondering if Spec.class was not generated properly.
This problem is only in the class file generated and not in the Device.java and Spec.java files.
Is this a bug or am I missing something in reference to javaType?
The text was updated successfully, but these errors were encountered: