org.apache.axis.message.addressing.tools.wsdl
Class JavaClassWithImportsWriter

java.lang.Object
  extended by org.apache.axis.wsdl.toJava.JavaWriter
      extended by org.apache.axis.wsdl.toJava.JavaClassWriter
          extended by org.apache.axis.message.addressing.tools.wsdl.JavaClassWithImportsWriter
All Implemented Interfaces:
org.apache.axis.wsdl.gen.Generator
Direct Known Subclasses:
JavaAddressingServiceIfaceImplWriter, JavaAddressingServiceImplWriter

public abstract class JavaClassWithImportsWriter
extends org.apache.axis.wsdl.toJava.JavaClassWriter

Class writer that manages an imports clause list, so generated code can be simplified.

Version:
$Revision: 14 $
Author:
Rodrigo Ruiz

Field Summary
protected  org.apache.axis.wsdl.symbolTable.ServiceEntry sEntry
          Service.
protected  org.apache.axis.wsdl.symbolTable.SymbolTable symbolTable
          Symbol table.
 
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, type
 
Constructor Summary
protected JavaClassWithImportsWriter(org.apache.axis.wsdl.toJava.Emitter emitter, org.apache.axis.wsdl.symbolTable.ServiceEntry sEntry, org.apache.axis.wsdl.symbolTable.SymbolTable symbolTable, java.lang.String entryName, java.lang.String type)
          Creates an instance.
 
Method Summary
protected  void addImport(java.lang.String className)
          Adds an import clause.
 void generate()
          
protected  java.lang.String getBindingType(javax.wsdl.Port port)
          Gets the name of the binding type associated to the specified Port.
protected  void initImports()
          Populates the imports map.
protected  java.lang.String resolve(java.lang.String className)
          Resolves a class name, and returns its simple name if it is imported.
protected abstract  void writeClassComment(java.io.PrintWriter pw)
          Generates the generated class javadoc comment.
protected  void writeFileHeader(java.io.PrintWriter pw)
          
protected  void writeHeaderComments(java.io.PrintWriter pw)
          
protected  void writeImports(java.io.PrintWriter pw)
          Writes the imports clauses.
 
Methods inherited from class org.apache.axis.wsdl.toJava.JavaClassWriter
getClassModifiers, getClassName, getClassText, getExtendsText, getFileName, getImplementsText, getPackage, registerFile, writeFileFooter, writePackage
 
Methods inherited from class org.apache.axis.wsdl.toJava.JavaWriter
closePrintWriter, getJavadocDescriptionPart, getPrintWriter, isFileGenerated, verboseMessage, writeComment, writeComment, writeFileBody
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sEntry

protected final org.apache.axis.wsdl.symbolTable.ServiceEntry sEntry
Service.


symbolTable

protected final org.apache.axis.wsdl.symbolTable.SymbolTable symbolTable
Symbol table.

Constructor Detail

JavaClassWithImportsWriter

protected JavaClassWithImportsWriter(org.apache.axis.wsdl.toJava.Emitter emitter,
                                     org.apache.axis.wsdl.symbolTable.ServiceEntry sEntry,
                                     org.apache.axis.wsdl.symbolTable.SymbolTable symbolTable,
                                     java.lang.String entryName,
                                     java.lang.String type)
Creates an instance.

Parameters:
emitter - Emitter
sEntry - Service
symbolTable - Symbol table
entryName - Name of the generated entry
type - Entry type
Method Detail

generate

public void generate()
              throws java.io.IOException

Specified by:
generate in interface org.apache.axis.wsdl.gen.Generator
Overrides:
generate in class org.apache.axis.wsdl.toJava.JavaWriter
Throws:
java.io.IOException

initImports

protected void initImports()
Populates the imports map.


addImport

protected final void addImport(java.lang.String className)
Adds an import clause.

Parameters:
className - Class to be imported

resolve

protected final java.lang.String resolve(java.lang.String className)
Resolves a class name, and returns its simple name if it is imported.

Parameters:
className - Fully qualified class name
Returns:
Simplified class name

getBindingType

protected final java.lang.String getBindingType(javax.wsdl.Port port)
Gets the name of the binding type associated to the specified Port.

Parameters:
port - Port to process
Returns:
Binding class name

writeImports

protected final void writeImports(java.io.PrintWriter pw)
Writes the imports clauses.

Parameters:
pw - To print to

writeHeaderComments

protected final void writeHeaderComments(java.io.PrintWriter pw)
                                  throws java.io.IOException

Overrides:
writeHeaderComments in class org.apache.axis.wsdl.toJava.JavaClassWriter
Throws:
java.io.IOException

writeFileHeader

protected final void writeFileHeader(java.io.PrintWriter pw)
                              throws java.io.IOException

Overrides:
writeFileHeader in class org.apache.axis.wsdl.toJava.JavaClassWriter
Throws:
java.io.IOException

writeClassComment

protected abstract void writeClassComment(java.io.PrintWriter pw)
                                   throws java.io.IOException
Generates the generated class javadoc comment.

Parameters:
pw - Writer to print to
Throws:
java.io.IOException - If an error occurs


Copyright © 2008-2009 Rodrigo Ruiz. All Rights Reserved.