org.codehaus.enunciate.modules.java_client.client-registry.fmt Maven / Gradle / Ivy
[#ftl]
[#--template for the client-side complex type.--]
[@file name="ObjectFactory.java" package=packageFor(registry) charset="utf-8"]
/**
* ${(generatedCodeLicense!"")?replace("\n", "\n * ")}
*
* Generated by Enunciate.
*/
package ${packageFor(registry)};
@javax.xml.bind.annotation.XmlRegistry
public class ObjectFactory {
public ObjectFactory() {
}
[#list registry.instanceFactoryMethods as instanceFactoryMethod]
public ${classnameFor(instanceFactoryMethod.returnType)} create${instanceFactoryMethod.returnType.declaration.simpleName}() {
return new ${classnameFor(instanceFactoryMethod.returnType)}();
}
[/#list]
[#list registry.localElementDeclarations as localElementDeclaration]
@javax.xml.bind.annotation.XmlElementDecl(namespace = "${localElementDeclaration.namespace?default("")}", name = "${localElementDeclaration.name}"[#if localElementDeclaration.scope?exists], scope = ${localElementDeclaration.scope.qualifiedName}.class[/#if][#if localElementDeclaration.substitutionHeadName?exists], substitutionHeadName = "${localElementDeclaration.substitutionHeadName}", substitutionHeadNamespace="${localElementDeclaration.substitutionHeadNamespace}"[/#if][#if localElementDeclaration.defaultValue?exists], defaultValue = "${localElementDeclaration.defaultValue}"[/#if])
public javax.xml.bind.JAXBElement<${classnameFor(localElementDeclaration.elementTypeDeclaration)}> create[#if localElementDeclaration.scope?exists]${localElementDeclaration.scope.simpleName}[/#if]${localElementDeclaration.name?cap_first}(${classnameFor(localElementDeclaration.elementTypeDeclaration)} value) {
return new javax.xml.bind.JAXBElement<${classnameFor(localElementDeclaration.elementTypeDeclaration)}>(new javax.xml.namespace.QName("${localElementDeclaration.namespace?default("")}","${localElementDeclaration.name}"), ${classnameFor(localElementDeclaration.elementTypeDeclaration)}.class, [#if localElementDeclaration.scope?exists]${localElementDeclaration.scope.qualifiedName}.class[#else]null[/#if], value);
}
[/#list]
}
[/@file]
© 2015 - 2025 Weber Informatics LLC | Privacy Policy