public abstract class FileWriter
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
EXTENSION_SUFFIX |
protected boolean |
fileExists |
protected boolean |
isOverride |
protected java.lang.String |
language |
protected java.io.File |
outputFile |
protected java.io.File |
outputFileLocation |
protected static java.lang.String |
SEPARATOR_STRING |
protected java.io.FileOutputStream |
stream |
protected static java.lang.String |
TEMPLATE_SUFFIX |
protected java.io.InputStream |
xsltStream |
| Constructor and Description |
|---|
FileWriter() |
| Modifier and Type | Method and Description |
|---|---|
void |
createOutFile(java.lang.String packageName,
java.lang.String fileName)
Creates the output file.
|
protected java.lang.String |
findTemplate(java.util.Map languageSpecificPropertyMap) |
protected java.lang.String |
getFileExtensionForLanguage(java.lang.String language)
Finds the file name extension.
|
java.io.File |
getOutputFile() |
boolean |
isOverride() |
void |
loadTemplate()
Loads the template.
|
void |
parse(org.w3c.dom.Document doc,
javax.xml.transform.URIResolver resolver)
Writes the output file.
|
void |
setLanguage(java.lang.String language)
Sets the language.
|
void |
setOutputFile(java.io.File outputFile) |
void |
setOverride(boolean override) |
protected java.io.File outputFileLocation
protected java.io.File outputFile
protected java.io.FileOutputStream stream
protected java.io.InputStream xsltStream
protected java.lang.String language
protected static final java.lang.String TEMPLATE_SUFFIX
protected static final java.lang.String EXTENSION_SUFFIX
protected static final java.lang.String SEPARATOR_STRING
protected boolean fileExists
protected boolean isOverride
public void setLanguage(java.lang.String language)
language - public void loadTemplate()
throws CodeGenerationException
CodeGenerationExceptionprotected java.lang.String findTemplate(java.util.Map languageSpecificPropertyMap)
public void createOutFile(java.lang.String packageName,
java.lang.String fileName)
throws java.lang.Exception
packageName - fileName - java.lang.Exceptionprotected java.lang.String getFileExtensionForLanguage(java.lang.String language)
language - public void parse(org.w3c.dom.Document doc,
javax.xml.transform.URIResolver resolver)
throws java.lang.Exception
doc - java.lang.Exceptionpublic boolean isOverride()
public void setOverride(boolean override)
public java.io.File getOutputFile()
public void setOutputFile(java.io.File outputFile)
Copyright © 2004-2018 The Apache Software Foundation. All Rights Reserved.