org.codehaus.enunciate.modules.gwt.gwt-fault.fmt Maven / Gradle / Ivy
[#ftl]
[#--template for the client-side web fault.--]
[@file name=(fault.simpleName + ".java") package=packageFor(fault) charset="utf-8"]
/**
* ${(generatedCodeLicense!"")?replace("\n", "\n * ")}
*
* Generated by Enunciate.
*/
package ${packageFor(fault)};
/**
* ${fault.docComment?default("(no documentation provided)")?chop_linebreak?replace("\n", "\n * ")}
*/
public class ${fault.simpleName} extends com.google.gwt.user.client.rpc.SerializableException {
public ${fault.simpleName}() {
}
public ${fault.simpleName}(String message) {
super(message);
}
[#if !fault.implicitSchemaElement]
[#assign beanfqn=classnameFor(fault.explicitFaultBeanType)/]
private ${beanfqn} faultInfo;
/**
* The fault info for this exception.
*/
public ${beanfqn} getFaultInfo() {
return this.faultInfo;
}
/**
* The fault info for this exception.
*/
public void setFaultInfo(${beanfqn} faultInfo) {
this.faultInfo = faultInfo;
}
[#else]
[#list fault.childElements as childElement]
[#assign element=childElement.property/]
private ${classnameFor(childElement)} ${element.simpleName};
/**
* ${(element.javaDoc.return!element.docValue!"(no documentation provided)")?chop_linebreak?replace("\n", "\n * ")}
*/
public ${classnameFor(childElement)} get${element.simpleName?cap_first}() {
return this.${element.simpleName};
}
/**
* ${(element.javaDoc.return!element.docValue!"(no documentation provided)")?chop_linebreak?replace("\n", "\n * ")}
*/
public void set${element.simpleName?cap_first}(${classnameFor(childElement)} ${element.simpleName}) {
this.${element.simpleName} = ${element.simpleName};
}
[/#list]
[/#if]
}
[/@file]