Package 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.java file.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.VectorattributesField attributesprotected booleancanSearchParentsField canSearchParentsprotected java.util.VectorelementMetaDataField elementMetaDataprotected java.util.VectorelementsField elementsprotected TypeEntryextendTypeField extendTypeprotected java.util.SetreservedPropNamesField reservedPropNamesprotected TypeEntrytypeField typeprotected java.io.PrintWriterwrapperPWField 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
Constructors Modifier Constructor Description protectedJavaBeanHelperWriter(Emitter emitter, TypeEntry type, java.util.Vector elements, TypeEntry extendType, java.util.Vector attributes, java.util.Set reservedPropNames)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidclosePrintWriter(java.io.PrintWriter pw)Only close the PrintWriter if the PrintWriter belongs to this class.protected java.io.PrintWritergetPrintWriter(java.lang.String filename)The default behaviour (of super.getPrintWriter) is, given the file name, create a PrintWriter for it.protected voidregisterFile(java.lang.String file)Only register the filename if the bean helper is not wrapped within a bean.protected voidsetPrintWriter(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.StringverboseMessage(java.lang.String file)Return the string: "Generating". protected voidwriteDeserializer(java.io.PrintWriter pw)write Deserializer getter code and pass in meta data to avoid undo introspection.protected voidwriteFileBody(java.io.PrintWriter pw)Generate the file body for the bean helper.protected voidwriteFileFooter(java.io.PrintWriter pw)Only write the file footer if the bean helper is not wrapped within a bean.protected voidwriteFileHeader(java.io.PrintWriter pw)Only write the file header if the bean helper is not wrapped within a bean.protected voidwriteMetaData(java.io.PrintWriter pw)write MetaData codeprotected voidwriteSerializer(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
-
-
-
-
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 classelements- Vector containing the Type and name of each propertyextendType- 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.IOExceptionThe 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:
getPrintWriterin classJavaWriter- 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:
registerFilein classJavaClassWriter- Parameters:
file-
-
verboseMessage
protected java.lang.String verboseMessage(java.lang.String file)
Return the string: "Generating". only if we are going to generate a new file. - Overrides:
verboseMessagein classJavaWriter- Parameters:
file-- Returns:
-
writeFileHeader
protected void writeFileHeader(java.io.PrintWriter pw) throws java.io.IOExceptionOnly write the file header if the bean helper is not wrapped within a bean.- Overrides:
writeFileHeaderin classJavaClassWriter- Parameters:
pw-- Throws:
java.io.IOException
-
writeFileBody
protected void writeFileBody(java.io.PrintWriter pw) throws java.io.IOExceptionGenerate the file body for the bean helper.- Specified by:
writeFileBodyin classJavaWriter- Parameters:
pw-- Throws:
java.io.IOException
-
writeFileFooter
protected void writeFileFooter(java.io.PrintWriter pw) throws java.io.IOExceptionOnly write the file footer if the bean helper is not wrapped within a bean.- Overrides:
writeFileFooterin classJavaClassWriter- 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:
closePrintWriterin classJavaWriter- Parameters:
pw-
-
writeMetaData
protected void writeMetaData(java.io.PrintWriter pw) throws java.io.IOExceptionwrite MetaData code- Parameters:
pw-- Throws:
java.io.IOException
-
writeSerializer
protected void writeSerializer(java.io.PrintWriter pw) throws java.io.IOExceptionwrite 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.IOExceptionwrite Deserializer getter code and pass in meta data to avoid undo introspection.- Parameters:
pw-- Throws:
java.io.IOException
-
-