org.apache.axis2.wsdl.codegen.writer
Class ClassWriter

java.lang.Object
  extended byorg.apache.axis2.wsdl.codegen.writer.ClassWriter
Direct Known Subclasses:
AntBuildWriter, CallbackHandlerWriter, InterfaceImplementationWriter, InterfaceWriter, MessageReceiverWriter, PolicyFileWriter, ServiceXMLWriter, SkeletonWriter, TestClassWriter

public abstract class ClassWriter
extends Object


Field Summary
protected static String EXTENSION_SUFFIX
           
protected  boolean fileExists
           
protected  String language
           
protected  File outputFile
           
protected  File outputFileLocation
           
protected static String SEPARATOR_STRING
           
protected  FileOutputStream stream
           
protected static String TEMPLATE_SUFFIX
           
protected  InputStream xsltStream
           
 
Constructor Summary
ClassWriter()
           
 
Method Summary
 void createOutFile(String packageName, String fileName)
          Creates the output file.
protected  String findTemplate(Map languageSpecificPropertyMap)
           
protected  String getFileExtensionForLanguage(String language)
          Finds the file name extension.
 void loadTemplate()
          Loads the template.
 void parse(Document doc, URIResolver resolver)
          Writes the output file.
 void setLanguage(String language)
          Sets the language.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

outputFileLocation

protected File outputFileLocation

outputFile

protected File outputFile

stream

protected FileOutputStream stream

xsltStream

protected InputStream xsltStream

language

protected String language

TEMPLATE_SUFFIX

protected static final String TEMPLATE_SUFFIX
See Also:
Constant Field Values

EXTENSION_SUFFIX

protected static final String EXTENSION_SUFFIX
See Also:
Constant Field Values

SEPARATOR_STRING

protected static final String SEPARATOR_STRING
See Also:
Constant Field Values

fileExists

protected boolean fileExists
Constructor Detail

ClassWriter

public ClassWriter()
Method Detail

setLanguage

public void setLanguage(String language)
Sets the language.

Parameters:
language -

loadTemplate

public void loadTemplate()
                  throws CodeGenerationException
Loads the template.

Throws:
CodeGenerationException

findTemplate

protected String findTemplate(Map languageSpecificPropertyMap)

createOutFile

public void createOutFile(String packageName,
                          String fileName)
                   throws Exception
Creates the output file.

Parameters:
packageName -
fileName -
Throws:
Exception

getFileExtensionForLanguage

protected String getFileExtensionForLanguage(String language)
Finds the file name extension.

Parameters:
language -
Returns:
Returns the file extension.

parse

public void parse(Document doc,
                  URIResolver resolver)
           throws Exception
Writes the output file.

Parameters:
doc -
Throws:
Exception