Class JavaEnumTypeWriter

All Implemented Interfaces:
Generator

public class JavaEnumTypeWriter extends JavaClassWriter
This is Wsdl2java's Complex Type Writer. It writes the .java file.
  • Constructor Details

    • JavaEnumTypeWriter

      protected JavaEnumTypeWriter(Emitter emitter, TypeEntry type, Vector elements)
      Constructor.
      Parameters:
      emitter -
      type -
      elements -
  • Method Details

    • getImplementsText

      protected String getImplementsText()
      Return "implements java.io.Serializable ".
      Overrides:
      getImplementsText in class 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)
      Specified by:
      writeFileBody in class JavaWriter
      Parameters:
      pw -
      Throws:
      IOException
    • 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.
    • 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 class JavaWriter
      Throws:
      IOException