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 Vector
Field attributesprotected boolean
Field canSearchParentsprotected Vector
Field elementMetaDataprotected Vector
Field elementsprotected TypeEntry
Field extendTypeprotected Set
Field reservedPropNamesprotected TypeEntry
Field typeprotected PrintWriter
Field wrapperPWFields 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 -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Only close the PrintWriter if the PrintWriter belongs to this class.protected PrintWriter
getPrintWriter
(String filename) The default behaviour (of super.getPrintWriter) is, given the file name, create a PrintWriter for it.protected void
registerFile
(String file) Only register the filename if the bean helper is not wrapped within a bean.protected void
The bean helper class may be its own class, or it may be embedded within the bean class.protected String
verboseMessage
(String file) Return the string: "Generating". protected void
write Deserializer getter code and pass in meta data to avoid undo introspection.protected void
Generate the file body for the bean helper.protected void
Only write the file footer if the bean helper is not wrapped within a bean.protected void
Only write the file header if the bean helper is not wrapped within a bean.protected void
write MetaData codeprotected void
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 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:
getPrintWriter
in classJavaWriter
- Parameters:
filename
-- Returns:
- Throws:
IOException
-
registerFile
Only register the filename if the bean helper is not wrapped within a bean.- Overrides:
registerFile
in classJavaClassWriter
- Parameters:
file
-
-
verboseMessage
Return the string: "Generating". only if we are going to generate a new file. - Overrides:
verboseMessage
in classJavaWriter
- Parameters:
file
-- Returns:
-
writeFileHeader
Only write the file header if the bean helper is not wrapped within a bean.- Overrides:
writeFileHeader
in classJavaClassWriter
- Parameters:
pw
-- Throws:
IOException
-
writeFileBody
Generate the file body for the bean helper.- Specified by:
writeFileBody
in 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:
closePrintWriter
in 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
-