Methods Summary |
---|
public void | generate()Generate a java source file for the holder class.
If the emitter works in deploy mode and the class already exists, the source wull not be generated.
String fqcn = getPackage() + "." + getClassName();
if (emitter.isDeploy()) {
if (!emitter.doesExist(fqcn)) {
super.generate();
}
} else {
super.generate();
}
|
protected java.lang.String | getClassModifiers()Return "public final ".
return super.getClassModifiers() + "final ";
|
protected java.lang.String | getImplementsText()Return "implements javax.xml.rpc.holders.Holder ".
return "implements javax.xml.rpc.holders.Holder ";
|
protected void | writeFileBody(java.io.PrintWriter pw)Generate the holder for the given complex type.
String holderType = type.getName();
if ((type instanceof CollectionType
&& ((CollectionType) type).isWrapped())
|| type.getUnderlTypeNillable()) {
/*
* For soapenc arrays or elements with maxOccurs="unbounded"
* having a primitive type and nillable="true" the holderType
* should be the corresponding wrapped type.
*/
holderType = Utils.getWrapperType(type);
}
pw.println(" public " + holderType + " value;");
pw.println();
pw.println(" public " + className + "() {");
pw.println(" }");
pw.println();
pw.println(" public " + className + "(" + holderType + " value) {");
pw.println(" this.value = value;");
pw.println(" }");
pw.println();
|