org.jboss.axis.wsdl.toJava
Class JavaEnumTypeWriter

java.lang.Object
  extended byorg.jboss.axis.wsdl.toJava.JavaWriter (src) 
      extended byorg.jboss.axis.wsdl.toJava.JavaClassWriter (src) 
          extended byorg.jboss.axis.wsdl.toJava.JavaEnumTypeWriter
All Implemented Interfaces:
Generator (src)

public class JavaEnumTypeWriter
extends JavaClassWriter (src)

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


Field Summary
 
Fields inherited from class org.jboss.axis.wsdl.toJava.JavaClassWriter (src)
className, namespaces, packageName
 
Fields inherited from class org.jboss.axis.wsdl.toJava.JavaWriter (src)
emitter, type
 
Constructor Summary
protected JavaEnumTypeWriter(Emitter (src)  emitter, TypeEntry (src)  type, java.util.Vector elements)
          Constructor.
 
Method Summary
static java.util.Vector getEnumValueIds(java.util.Vector bv)
          Get the enumeration names for the values.
protected  java.lang.String getImplementsText()
          Return "implements java.io.Serializable ".
protected  void writeFileBody(java.io.PrintWriter pw)
          Generate the binding for the given enumeration type.
 
Methods inherited from class org.jboss.axis.wsdl.toJava.JavaClassWriter (src)
getClassModifiers, getClassName, getClassText, getExtendsText, getFileName, getPackage, registerFile, writeFileFooter, writeFileHeader, writeHeaderComments, writePackage
 
Methods inherited from class org.jboss.axis.wsdl.toJava.JavaWriter (src)
closePrintWriter, generate, getPrintWriter, isFileGenerated, verboseMessage, writeComment
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaEnumTypeWriter

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

Method Detail

getImplementsText

protected java.lang.String getImplementsText()
Return "implements java.io.Serializable ".

Overrides:
getImplementsText in class JavaClassWriter (src)
Returns:
""

writeFileBody

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

Specified by:
writeFileBody in class JavaWriter (src)
Throws:
java.io.IOException

getEnumValueIds

public static java.util.Vector getEnumValueIds(java.util.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 enums value identifiers.