public class SourceGenerator
extends java.lang.Object
Constructor and Description |
---|
SourceGenerator(java.io.File filepath,
java.lang.String author,
java.lang.String version)
creates a source generator and generates the automatically generated code
header to it
|
Modifier and Type | Method and Description |
---|---|
void |
bl()
breaks line (adds a carriage return)
|
void |
close()
closes the file (if not done, the content may not be written in the file)
|
void |
w(java.lang.String content)
write text without a carriage return at the end
|
void |
wl(java.lang.String content)
writes content and put a return carriage at the end
|
void |
writeHeader(java.lang.String author,
java.lang.String version)
writes the auto-generated file header
|
public SourceGenerator(java.io.File filepath, java.lang.String author, java.lang.String version) throws java.io.IOException
filepath
- path of the file (folders + file name)author
- author of the moduleversion
- version of the modulejava.io.IOException
- if anything bad happens creating the filepublic void wl(java.lang.String content) throws java.io.IOException
content
- text without a carriage return at the endjava.io.IOException
- if anything bad happens while writing the filepublic void bl() throws java.io.IOException
java.io.IOException
public void w(java.lang.String content) throws java.io.IOException
content
- contentjava.io.IOException
- if anything bad happens while writing the filepublic void close() throws java.io.IOException
java.io.IOException
- if anything bad happens while closing the filepublic void writeHeader(java.lang.String author, java.lang.String version) throws java.io.IOException
author
- author of the moduleversion
- version of the modulejava.io.IOException
- if anything bad happens while writing the header