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
This is Wsdl2java's Helper Type Writer. It writes the .java file.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected VectorField attributesprotected booleanField canSearchParentsprotected VectorField elementMetaDataprotected VectorField elementsprotected TypeEntryField extendTypeprotected SetField reservedPropNamesprotected TypeEntryField typeprotected PrintWriterField wrapperPWFields inherited from class org.apache.axis.wsdl.toJava.JavaClassWriter
className, namespaces, packageNameFields inherited from class org.apache.axis.wsdl.toJava.JavaWriter
emitter, LINE_LENGTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidOnly 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 voidThe 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". protected voidwrite Deserializer getter code and pass in meta data to avoid undo introspection.protected voidGenerate the file body for the bean helper.protected voidOnly write the file footer if the bean helper is not wrapped within a bean.protected voidOnly write the file header if the bean helper is not wrapped within a bean.protected voidwrite MetaData codeprotected voidwrite 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, writePackageMethods inherited from class org.apache.axis.wsdl.toJava.JavaWriter
generate, getJavadocDescriptionPart, isFileGenerated, writeComment, writeComment
-
Field Details
-
type
Field type -
elements
Field elements -
attributes
Field attributes -
extendType
Field extendType -
wrapperPW
Field wrapperPW -
elementMetaData
Field elementMetaData -
canSearchParents
protected boolean canSearchParentsField canSearchParents -
reservedPropNames
Field reservedPropNames
-
-
Constructor Details
-
JavaBeanHelperWriter
protected JavaBeanHelperWriter(Emitter emitter, TypeEntry type, Vector elements, TypeEntry extendType, Vector attributes, 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 Details
-
setPrintWriter
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
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:
getPrintWriterin classJavaWriter- Parameters:
filename-- Returns:
- Throws:
IOException
-
registerFile
Only register the filename if the bean helper is not wrapped within a bean.- Overrides:
registerFilein classJavaClassWriter- Parameters:
file-
-
verboseMessage
Return the string: "Generating". only if we are going to generate a new file. - Overrides:
verboseMessagein classJavaWriter- Parameters:
file-- Returns:
-
writeFileHeader
Only write the file header if the bean helper is not wrapped within a bean.- Overrides:
writeFileHeaderin classJavaClassWriter- Parameters:
pw-- Throws:
IOException
-
writeFileBody
Generate the file body for the bean helper.- Specified by:
writeFileBodyin classJavaWriter- Parameters:
pw-- Throws:
IOException
-
closePrintWriter
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
write MetaData code- Parameters:
pw-- Throws:
IOException
-
writeSerializer
write Serializer getter code and pass in meta data to avoid undo introspection.- Parameters:
pw-- Throws:
IOException
-
writeDeserializer
write Deserializer getter code and pass in meta data to avoid undo introspection.- Parameters:
pw-- Throws:
IOException
-