-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot get property 'imports' on null object #13
Comments
If I use
|
I debugged to it and figured that it processes an enum type and then fails to get it's parent class (the left-shift operator on This is the XSD snippet it stumbles across: <xs:simpleType name="boolean">
<xs:restriction base="xs:string">
<xs:enumeration value="True" />
<xs:enumeration value="False" />
</xs:restriction>
</xs:simpleType> xjc creates the following Java POJO for this: @XmlType(name = "boolean")
@XmlEnum
public enum Boolean {
@XmlEnumValue("True")
TRUE("True"),
@XmlEnumValue("False")
FALSE("False");
private final String value;
Boolean(String v) {
value = v;
}
public String value() {
return value;
}
public static Boolean fromValue(String v) {
for (Boolean c: Boolean.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
} I'm not exactly sure what this "parent" is supposed to mean in this context. XSD-wise, this type (and others) are common types that reside in a separate |
I wrote some code to flatten the import statement and include all the imported element definitions in the source file. Still, the code exits for the |
I'm trying to generate Kotlin classes for my XSDs. This is the calling code:
The XSD file is valid (and was used to create Java Beans via xjc before), the targetDir is valid as well and exists, the package name is non-empty. When I execute this code in my custom task, I receive the following crash:
My Groovy-foo is not good enough to figure out whats going on here, so maybe you have an idea?
The text was updated successfully, but these errors were encountered: