org.apache.axis.wsdl.toJava

Class JavaBeanHelperWriter

public class JavaBeanHelperWriter extends JavaClassWriter

This is Wsdl2java's Helper Type Writer. It writes the .java file.
Field Summary
protected Vectorattributes
Field attributes
protected booleancanSearchParents
Field canSearchParents
protected VectorelementMetaData
Field elementMetaData
protected Vectorelements
Field elements
protected TypeEntryextendType
Field extendType
protected SetreservedPropNames
Field reservedPropNames
protected TypeEntrytype
Field type
protected PrintWriterwrapperPW
Field wrapperPW
Constructor Summary
protected JavaBeanHelperWriter(Emitter emitter, TypeEntry type, Vector elements, TypeEntry extendType, Vector attributes, Set reservedPropNames)
Constructor.
Method Summary
protected voidclosePrintWriter(PrintWriter pw)
Only close the PrintWriter if the PrintWriter belongs to this class.
protected PrintWritergetPrintWriter(String filename)
The default behaviour (of super.getPrintWriter) is, given the file name, create a PrintWriter for it.
protected voidregisterFile(String file)
Only register the filename if the bean helper is not wrapped within a bean.
protected voidsetPrintWriter(PrintWriter pw)
The bean helper class may be its own class, or it may be embedded within the bean class.
protected StringverboseMessage(String file)
Return the string: "Generating ". only if we are going to generate a new file.
protected voidwriteDeserializer(PrintWriter pw)
write Deserializer getter code and pass in meta data to avoid undo introspection.
protected voidwriteFileBody(PrintWriter pw)
Generate the file body for the bean helper.
protected voidwriteFileFooter(PrintWriter pw)
Only write the file footer if the bean helper is not wrapped within a bean.
protected voidwriteFileHeader(PrintWriter pw)
Only write the file header if the bean helper is not wrapped within a bean.
protected voidwriteMetaData(PrintWriter pw)
write MetaData code
protected voidwriteSerializer(PrintWriter pw)
write Serializer getter code and pass in meta data to avoid undo introspection.

Field Detail

attributes

protected Vector attributes
Field attributes

canSearchParents

protected boolean canSearchParents
Field canSearchParents

elementMetaData

protected Vector elementMetaData
Field elementMetaData

elements

protected Vector elements
Field elements

extendType

protected TypeEntry extendType
Field extendType

reservedPropNames

protected Set reservedPropNames
Field reservedPropNames

type

protected TypeEntry type
Field type

wrapperPW

protected PrintWriter wrapperPW
Field wrapperPW

Constructor Detail

JavaBeanHelperWriter

protected JavaBeanHelperWriter(Emitter emitter, TypeEntry type, Vector elements, TypeEntry extendType, Vector attributes, 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

closePrintWriter

protected void closePrintWriter(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.

Parameters: pw

getPrintWriter

protected PrintWriter getPrintWriter(String filename)
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.

Parameters: filename

Returns:

Throws: IOException

registerFile

protected void registerFile(String file)
Only register the filename if the bean helper is not wrapped within a bean.

Parameters: file

setPrintWriter

protected void setPrintWriter(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

verboseMessage

protected String verboseMessage(String file)
Return the string: "Generating ". only if we are going to generate a new file.

Parameters: file

Returns:

writeDeserializer

protected void writeDeserializer(PrintWriter pw)
write Deserializer getter code and pass in meta data to avoid undo introspection.

Parameters: pw

Throws: IOException

writeFileBody

protected void writeFileBody(PrintWriter pw)
Generate the file body for the bean helper.

Parameters: pw

Throws: IOException

writeFileFooter

protected void writeFileFooter(PrintWriter pw)
Only write the file footer if the bean helper is not wrapped within a bean.

Parameters: pw

Throws: IOException

writeFileHeader

protected void writeFileHeader(PrintWriter pw)
Only write the file header if the bean helper is not wrapped within a bean.

Parameters: pw

Throws: IOException

writeMetaData

protected void writeMetaData(PrintWriter pw)
write MetaData code

Parameters: pw

Throws: IOException

writeSerializer

protected void writeSerializer(PrintWriter pw)
write Serializer getter code and pass in meta data to avoid undo introspection.

Parameters: pw

Throws: IOException

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