xmltool.classgen
Class FileWrite
java.lang.Object
|
+--xmltool.classgen.FileWrite
- public class FileWrite
- extends java.lang.Object
Actual file creation for the classes to be used with POET
database.
|
Field Summary |
java.io.FileWriter |
optFW
FileWriter for the ptjavac.opt file |
|
Constructor Summary |
FileWrite(java.lang.String className)
Constructor |
|
Method Summary |
void |
close()
Method to write closing information, and to close the
the file itself |
void |
writeClassBegin()
Method to write class definition statement |
void |
writeClassEnd()
Method to write class ending statement |
void |
writeDeclarations(ParsedData pd,
boolean isRoot,
boolean isInterface,
int count,
boolean someParentIsCollection)
Method to write declarations and other statements for
the class |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
optFW
public java.io.FileWriter optFW
- FileWriter for the ptjavac.opt file
FileWrite
public FileWrite(java.lang.String className)
throws java.io.IOException
- Constructor
- Parameters:
className - Name of the class file- Throws:
- java.io.IOException - can't write to file
close
public void close()
throws java.io.IOException
- Method to write closing information, and to close the
the file itself
- Throws:
- java.io.IOException - can't write to file
writeClassBegin
public void writeClassBegin()
throws java.io.IOException
- Method to write class definition statement
- Throws:
- java.io.IOException - can't write to file
writeClassEnd
public void writeClassEnd()
throws java.io.IOException
- Method to write class ending statement
- Throws:
- java.io.IOException - can't write to file
writeDeclarations
public void writeDeclarations(ParsedData pd,
boolean isRoot,
boolean isInterface,
int count,
boolean someParentIsCollection)
throws java.io.IOException
- Method to write declarations and other statements for
the class
- Parameters:
pd - ParsedData being parsed currentlyisRoot - Value to indicate if the element under consideration
is a rootisInterface - Value to indicate if the file being written is a
special file being written to handle Collection datatypescount - Element number in the ParsedDatasomeParentIsCollection - Value to indicate if special handling
is required as parent element is collection type- Throws:
- java.io.IOException - can't write to file