com.legstar.jaxb.generator.jaxb.wrappers.factory.field.get.hbs Maven / Gradle / Ivy
case {{fieldIndex}}:
{{~#if complexType}}
{{~#if maxOccurs}}
java.util.List < {{complexTypeName}}JaxbWrapper > {{@key}} = new java.util.ArrayList < {{complexTypeName}}JaxbWrapper >();
for ({{#if jaxb_package_name}}{{jaxb_package_name}}.{{/if}}{{capFirst @key}} jaxbItem : getJaxb().get{{capFirst @key}}()) {
{{@key}}.add(new {{complexTypeName}}JaxbWrapper(jaxbItem));
}
return {{@key}};
{{~else}}
return new {{complexTypeName}}JaxbWrapper(getJaxb().get{{capFirst @key}}());
{{~/if ~}}{{!-- maxOccurs --}}
{{~else}}
{{~#if choiceType}}
{{~#each alternatives}}
{{#unless @first}} } else{{/unless}} if (getJaxb().get{{capFirst @key}}() != null) {
{{~#if complexType}}
return new {{complexTypeName}}JaxbWrapper(getJaxb().get{{capFirst @key}}());
{{~else}}
return getJaxb().get{{capFirst @key}}();
{{~/if ~}}{{!-- complexType in choiceType--}}
{{~/each}}{{!-- this: fields in choice type --}}
} else {
throw new NoAlternativeForChoiceException("{{choiceTypeName}}");
}
{{~else}}
return getJaxb().get{{capFirst @key}}();
{{~/if ~}}{{!-- choiceType --}}
{{~/if ~}}{{!-- complexType --}}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy