|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.axis.wsdl.JavaWriter
All of Wsdl2java's Writer implementations do some common stuff. All this common stuff resides in this abstract base class. All that extensions to this class have to do is implement writeFileBody. Emitter knows about WSDL writers, one each for PortType, Binding, Service, Definition, Type. But for some of these WSDL types, Wsdl2java generates multiple files. Each of these files has a corresponding writer that extends JavaWriter. So the Java WSDL writers (JavaPortTypeWriter, JavaBindingWriter, etc.) each calls a file writer (JavaStubWriter, JavaSkelWriter, etc.) for each file that that WSDL generates. For example, when Emitter calls JavaWriterFactory for a Binding Writer, it returns a JavaBindingWriter. JavaBindingWriter, in turn, contains a JavaStubWriter, JavaSkelWriter, and JavaImplWriter since a Binding may cause a stub, skeleton, and impl template to be generated. Note that the writers that are given to Emitter by JavaWriterFactory DO NOT extend JavaWriter. They simply implement Writer and delegate the actual task of writing to extensions of JavaWriter.
Field Summary | |
protected java.lang.String |
className
|
protected Emitter |
emitter
|
protected java.lang.String |
fileName
|
protected java.lang.String |
message
|
protected Namespaces |
namespaces
|
protected java.lang.String |
packageName
|
protected java.io.PrintWriter |
pw
|
protected javax.wsdl.QName |
qname
|
Constructor Summary | |
protected |
JavaWriter(Emitter emitter,
javax.wsdl.QName qname,
java.lang.String suffix,
java.lang.String extension,
java.lang.String message)
Constructor. |
protected |
JavaWriter(Emitter emitter,
SymTabEntry entry,
java.lang.String suffix,
java.lang.String extension,
java.lang.String message)
Constructor. |
Method Summary | |
protected boolean |
fileExists(java.lang.String name,
java.lang.String namespace)
Does the given file already exist? |
protected java.lang.String |
getResponseString(Type type,
java.lang.String var)
Return the Object variable 'var' cast to the appropriate type doing the right thing for the primitive types. |
protected void |
initializeDeploymentDoc(java.lang.String deploymentOpName)
Initialize the deployment document, spit out preamble comments and opening tag. |
protected boolean |
isPrimitiveType(Type type)
|
protected java.lang.String |
wrapPrimitiveType(Type type,
java.lang.String var)
Return a string with "var" wrapped as an Object type if needed |
void |
write()
Create the file, write the header, write the body. |
protected void |
writeComment(java.io.PrintWriter pw,
org.w3c.dom.Element element)
output documentation element as a Java comment. |
protected abstract void |
writeFileBody()
Write the body of the file. |
protected void |
writeFileHeader()
Write a common header, including the package name. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Emitter emitter
protected javax.wsdl.QName qname
protected Namespaces namespaces
protected java.lang.String className
protected java.lang.String fileName
protected java.lang.String packageName
protected java.io.PrintWriter pw
protected java.lang.String message
Constructor Detail |
protected JavaWriter(Emitter emitter, SymTabEntry entry, java.lang.String suffix, java.lang.String extension, java.lang.String message)
protected JavaWriter(Emitter emitter, javax.wsdl.QName qname, java.lang.String suffix, java.lang.String extension, java.lang.String message)
Method Detail |
public void write() throws java.io.IOException
write
in interface Writer
protected void writeFileHeader() throws java.io.IOException
protected void writeComment(java.io.PrintWriter pw, org.w3c.dom.Element element)
protected java.lang.String wrapPrimitiveType(Type type, java.lang.String var)
protected java.lang.String getResponseString(Type type, java.lang.String var)
protected boolean isPrimitiveType(Type type)
protected void initializeDeploymentDoc(java.lang.String deploymentOpName) throws java.io.IOException
protected boolean fileExists(java.lang.String name, java.lang.String namespace) throws java.io.IOException
protected abstract void writeFileBody() throws java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |