Class FileWriter
- java.lang.Object
-
- org.apache.axis2.wsdl.codegen.writer.FileWriter
-
- Direct Known Subclasses:
AntBuildWriter,CallbackHandlerWriter,CBuildScriptWriter,CServiceXMLWriter,CStubHeaderWriter,CStubSourceWriter,CSvcSkeletonWriter,CVCProjectWriter,ExceptionWriter,InterfaceImplementationWriter,InterfaceWriter,MessageReceiverWriter,PolicyFileWriter,ServiceXMLWriter,SkeletonInterfaceWriter,SkeletonWriter,TestClassWriter
public abstract class FileWriter extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringEXTENSION_SUFFIXprotected booleanfileExistsprotected booleanisOverrideprotected Stringlanguageprotected FileoutputFileprotected FileoutputFileLocationprotected static StringSEPARATOR_STRINGprotected FileOutputStreamstreamprotected static StringTEMPLATE_SUFFIXprotected InputStreamxsltStream
-
Constructor Summary
Constructors Constructor Description FileWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateOutFile(String packageName, String fileName)Creates the output file.protected StringfindTemplate(Map languageSpecificPropertyMap)protected StringgetFileExtensionForLanguage(String language)Finds the file name extension.FilegetOutputFile()booleanisOverride()voidloadTemplate()Loads the template.voidparse(Document doc, URIResolver resolver)Writes the output file.voidsetLanguage(String language)Sets the language.voidsetOutputFile(File outputFile)voidsetOverride(boolean override)
-
-
-
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
-
isOverride
protected boolean isOverride
-
-
Method Detail
-
setLanguage
public void setLanguage(String language)
Sets the language.- Parameters:
language-
-
loadTemplate
public void loadTemplate() throws CodeGenerationExceptionLoads the template.- Throws:
CodeGenerationException
-
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
-
isOverride
public boolean isOverride()
-
setOverride
public void setOverride(boolean override)
-
getOutputFile
public File getOutputFile()
-
setOutputFile
public void setOutputFile(File outputFile)
-
-