org.apache.axis.wsdl.toJava

Class JavaEnumTypeWriter

public class JavaEnumTypeWriter extends JavaClassWriter

This is Wsdl2java's Complex Type Writer. It writes the .java file.
Constructor Summary
protected JavaEnumTypeWriter(Emitter emitter, TypeEntry type, Vector elements)
Constructor.
Method Summary
voidgenerate()
Generate a java source file for enum class.
static VectorgetEnumValueIds(Vector bv)
Get the enumeration names for the values.
protected StringgetImplementsText()
Return "implements java.io.Serializable ".
protected voidwriteFileBody(PrintWriter pw)
Generate the binding for the given enumeration type.

Constructor Detail

JavaEnumTypeWriter

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

Parameters: emitter type elements

Method Detail

generate

public void generate()
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.

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 ".

Returns:

writeFileBody

protected void writeFileBody(PrintWriter pw)
Generate the binding for the given enumeration type. The values vector contains the base type (first index) and the values (subsequent Strings)

Parameters: pw

Throws: IOException

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