Cantaloop CGimlet - API Documentation, Version: 0.2.0, Date: 2002-05-13 21:30 CEST

org.cantaloop.cgimlet.lang
Interface CodeWriter

All Known Implementing Classes:
AbstractCodeWriter

public interface CodeWriter

Classes that want to print or write the generated code must implement this interface.

Version:
0.2.0 ($Revision: 1.1 $)
Author:
David Leuschner, Stefan Heimann
See Also:
AbstractCodeWriter

Method Summary
 java.io.File getBaseDir()
          Get the base directory of the generated files.
 java.io.File getPrettyPrintConfiguration()
          Get the configuration file for the pretty printer.
 boolean isPrettyPrinting()
          Check if pretty printing is enabled or not.
 void setBaseDir(java.io.File f)
          Set the base directory of the generated files.
 void setPrettyPrintConfiguration(java.io.File f)
          Set the configuration file for the pretty printer.
 void setPrettyPrinting(boolean b)
          Specify if generated files should be pretty-printed.
 java.io.File write(ClassTemplate tmpl)
          Write the code for tmpl.
 java.io.File[] write(ClassTemplate[] tmpl)
          Write the code for tmpls.
 

Method Detail

setPrettyPrinting

public void setPrettyPrinting(boolean b)
Specify if generated files should be pretty-printed.
Parameters:
b - a boolean value

isPrettyPrinting

public boolean isPrettyPrinting()
Check if pretty printing is enabled or not.
Returns:
a boolean value

setPrettyPrintConfiguration

public void setPrettyPrintConfiguration(java.io.File f)
Set the configuration file for the pretty printer.
Parameters:
f - a File value

getPrettyPrintConfiguration

public java.io.File getPrettyPrintConfiguration()
Get the configuration file for the pretty printer.
Returns:
a File value

setBaseDir

public void setBaseDir(java.io.File f)
Set the base directory of the generated files.
Parameters:
f - a File value

getBaseDir

public java.io.File getBaseDir()
Get the base directory of the generated files.
Returns:
a File value

write

public java.io.File write(ClassTemplate tmpl)
                   throws java.io.IOException
Write the code for tmpl.
Returns:
the written file
Throws:
java.io.IOException - if an error occures while writing the code.

write

public java.io.File[] write(ClassTemplate[] tmpl)
                     throws java.io.IOException
Write the code for tmpls.
Returns:
the written file(s)
Throws:
java.io.IOException - if an error occures while writing the code.

Copyright 2001, 2002 Stefan Heimann, David Leuschner. All rights reserved.