org.apache.axis.wsdl.toJava

Class JavaEnumTypeWriter

Implemented Interfaces:
Generator

public class JavaEnumTypeWriter
extends JavaClassWriter

This is Wsdl2java's Complex Type Writer. It writes the .java file.

Field Summary

Fields inherited from class org.apache.axis.wsdl.toJava.JavaClassWriter

className, namespaces, packageName

Fields inherited from class org.apache.axis.wsdl.toJava.JavaWriter

LINE_LENGTH, emitter, type

Constructor Summary

JavaEnumTypeWriter(Emitter emitter, TypeEntry type, Vector elements)
Constructor.

Method Summary

void
generate()
Generate a java source file for enum class.
static Vector
getEnumValueIds(Vector bv)
Get the enumeration names for the values.
protected String
getImplementsText()
Return "implements java.io.Serializable ".
protected void
writeFileBody(PrintWriter pw)
Generate the binding for the given enumeration type.

Methods inherited from class org.apache.axis.wsdl.toJava.JavaClassWriter

getClassModifiers, getClassName, getClassText, getExtendsText, getFileName, getImplementsText, getPackage, registerFile, writeFileFooter, writeFileHeader, writeHeaderComments, writePackage

Methods inherited from class org.apache.axis.wsdl.toJava.JavaWriter

closePrintWriter, generate, getFileName, getJavadocDescriptionPart, getPrintWriter, isFileGenerated, registerFile, verboseMessage, writeComment, writeComment, writeFileBody, writeFileFooter, writeFileHeader

Constructor Details

JavaEnumTypeWriter

protected JavaEnumTypeWriter(Emitter emitter,
                             TypeEntry type,
                             Vector elements)
Constructor.

Parameters:
emitter -
type -
elements -

Method Details

generate

public void generate()
            throws IOException
Generate a java source file for enum class. If the emitter works in deploy mode and the class already exists, the source wull not be generated.
Specified by:
generate in interface Generator
Overrides:
generate in interface JavaWriter


getEnumValueIds

public static Vector getEnumValueIds(Vector bv)
Get the enumeration names for the values. The name is affected by whether all of the values of the enumeration can be expressed as valid java identifiers.

Parameters:
bv - Vector base and values vector from getEnumerationBaseAndValues

Returns:
Vector names of enum value identifiers.


getImplementsText

protected String getImplementsText()
Return "implements java.io.Serializable ".
Overrides:
getImplementsText in interface JavaClassWriter

Returns:


writeFileBody

protected void writeFileBody(PrintWriter pw)
            throws IOException
Generate the binding for the given enumeration type. The values vector contains the base type (first index) and the values (subsequent Strings)
Overrides:
writeFileBody in interface JavaWriter

Parameters:
pw -


Copyright B) 2005 Apache Web Services Project. All Rights Reserved.