## org.apache.axis.wsdl.toJava
Class JavaBeanHelperWriter

    java.lang.Object
      org.apache.axis.wsdl.toJava.JavaWriter
          org.apache.axis.wsdl.toJava.JavaClassWriter
              org.apache.axis.wsdl.toJava.JavaBeanHelperWriter

All Implemented Interfaces:
  Generator

public class JavaBeanHelperWriter
extends JavaClassWriter

This is Wsdl2java's Helper Type Writer. It writes the <typeName>.java file.

Field Summary
`protected java.util.Vector` `attributes` Field attributes
`protected boolean` `canSearchParents` Field canSearchParents
`protected java.util.Vector` `elementMetaData` Field elementMetaData
`protected java.util.Vector` `elements` Field elements
`protected TypeEntry` `extendType` Field extendType
`protected java.util.Set` `reservedPropNames` Field reservedPropNames
`protected TypeEntry` `type` Field type
`protected java.io.PrintWriter` `wrapperPW` Field wrapperPW

Fields inherited from class org.apache.axis.wsdl.toJava.JavaClassWriter
`className, namespaces, packageName`

Fields inherited from class org.apache.axis.wsdl.toJava.JavaWriter
`emitter, LINE_LENGTH`

Constructor Summary
`protected` `JavaBeanHelperWriter(Emitter emitter, TypeEntry type, java.util.Vector elements, TypeEntry extendType, java.util.Vector attributes, java.util.Set reservedPropNames)` Constructor.

Method Summary
`protected void` `closePrintWriter(java.io.PrintWriter pw)` Only close the PrintWriter if the PrintWriter belongs to this class.
`protected java.io.PrintWriter` `getPrintWriter(java.lang.String filename)` The default behaviour (of super.getPrintWriter) is, given the file name, create a PrintWriter for it.
`protected void` `registerFile(java.lang.String file)` Only register the filename if the bean helper is not wrapped within a bean.
`protected void` `setPrintWriter(java.io.PrintWriter pw)` The bean helper class may be its own class, or it may be embedded within the bean class.
`protected java.lang.String` `verboseMessage(java.lang.String file)` Return the string: "Generating <file>".
`protected void` `writeDeserializer(java.io.PrintWriter pw)` write Deserializer getter code and pass in meta data to avoid undo introspection.
`protected void` `writeFileBody(java.io.PrintWriter pw)` Generate the file body for the bean helper.
`protected void` `writeFileFooter(java.io.PrintWriter pw)` Only write the file footer if the bean helper is not wrapped within a bean.
`protected void` `writeFileHeader(java.io.PrintWriter pw)` Only write the file header if the bean helper is not wrapped within a bean.
`protected void` `writeMetaData(java.io.PrintWriter pw)` write MetaData code
`protected void` `writeSerializer(java.io.PrintWriter pw)` write Serializer getter code and pass in meta data to avoid undo introspection.

Methods inherited from class org.apache.axis.wsdl.toJava.JavaClassWriter
`getClassModifiers, getClassName, getClassText, getExtendsText, getFileName, getImplementsText, getPackage, writeHeaderComments, writePackage`

Methods inherited from class org.apache.axis.wsdl.toJava.JavaWriter
`generate, getJavadocDescriptionPart, isFileGenerated, writeComment, writeComment`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### type

    protected TypeEntry type

  Field type

### elements

    protected java.util.Vector elements

  Field elements

### attributes

    protected java.util.Vector attributes

  Field attributes

### extendType

    protected TypeEntry extendType

  Field extendType

### wrapperPW

    protected java.io.PrintWriter wrapperPW

  Field wrapperPW

### elementMetaData

    protected java.util.Vector elementMetaData

  Field elementMetaData

### canSearchParents

    protected boolean canSearchParents

  Field canSearchParents

### reservedPropNames

    protected java.util.Set reservedPropNames

  Field reservedPropNames

Constructor Detail

### JavaBeanHelperWriter

    protected JavaBeanHelperWriter(Emitter emitter,
                                   TypeEntry type,
                                   java.util.Vector elements,
                                   TypeEntry extendType,
                                   java.util.Vector attributes,
                                   java.util.Set reservedPropNames)

  Constructor.

Parameters:
  `emitter` -
  `type` - The type representing this class
  `elements` - Vector containing the Type and name of each property
  `extendType` - The type representing the extended class (or null)
  `attributes` - Vector containing the attribute types and names

Method Detail

### setPrintWriter

    protected void setPrintWriter(java.io.PrintWriter pw)

  The bean helper class may be its own class, or it may be embedded within the bean class. If it's embedded within the bean class, the JavaBeanWriter will set JavaBeanHelperWriter's PrintWriter to its own.

  Parameters:
    `pw` -

### getPrintWriter

    protected java.io.PrintWriter getPrintWriter(java.lang.String filename)
                                          throws java.io.IOException

  The default behaviour (of super.getPrintWriter) is, given the file name, create a PrintWriter for it. If the bean helper that this class is generating is embedded within a bean, then the PrintWriter returned by this method is the JavaBeanWriter's PrintWriter. Otherwise super.getPrintWriter is called.

  Overrides:
    `getPrintWriter` in class `JavaWriter`
  Parameters:
    `filename` -
  Returns:
  Throws:
    `java.io.IOException`

### registerFile

    protected void registerFile(java.lang.String file)

  Only register the filename if the bean helper is not wrapped within a bean.

  Overrides:
    `registerFile` in class `JavaClassWriter`
  Parameters:
    `file` -

### verboseMessage

    protected java.lang.String verboseMessage(java.lang.String file)

  Return the string: "Generating <file>". only if we are going to generate a new file.

  Overrides:
    `verboseMessage` in class `JavaWriter`
  Parameters:
    `file` -
  Returns:

### writeFileHeader

    protected void writeFileHeader(java.io.PrintWriter pw)
                            throws java.io.IOException

  Only write the file header if the bean helper is not wrapped within a bean.

  Overrides:
    `writeFileHeader` in class `JavaClassWriter`
  Parameters:
    `pw` -
  Throws:
    `java.io.IOException`

### writeFileBody

    protected void writeFileBody(java.io.PrintWriter pw)
                          throws java.io.IOException

  Generate the file body for the bean helper.

  Specified by:
    `writeFileBody` in class `JavaWriter`
  Parameters:
    `pw` -
  Throws:
    `java.io.IOException`

### writeFileFooter

    protected void writeFileFooter(java.io.PrintWriter pw)
                            throws java.io.IOException

  Only write the file footer if the bean helper is not wrapped within a bean.

  Overrides:
    `writeFileFooter` in class `JavaClassWriter`
  Parameters:
    `pw` -
  Throws:
    `java.io.IOException`

### closePrintWriter

    protected void closePrintWriter(java.io.PrintWriter pw)

  Only close the PrintWriter if the PrintWriter belongs to this class. If the bean helper is embedded within a bean then the PrintWriter belongs to JavaBeanWriter and THAT class is responsible for closing the PrintWriter.

  Overrides:
    `closePrintWriter` in class `JavaWriter`
  Parameters:
    `pw` -

### writeMetaData

    protected void writeMetaData(java.io.PrintWriter pw)
                          throws java.io.IOException

  write MetaData code

  Parameters:
    `pw` -
  Throws:
    `java.io.IOException`

### writeSerializer

    protected void writeSerializer(java.io.PrintWriter pw)
                            throws java.io.IOException

  write Serializer getter code and pass in meta data to avoid undo introspection.

  Parameters:
    `pw` -
  Throws:
    `java.io.IOException`

### writeDeserializer

    protected void writeDeserializer(java.io.PrintWriter pw)
                              throws java.io.IOException

  write Deserializer getter code and pass in meta data to avoid undo introspection.

  Parameters:
    `pw` -
  Throws:
    `java.io.IOException`

Copyright © 2005 Apache Web Services Project. All Rights Reserved.