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

org.cantaloop.cgimlet
Class ProjectRunner

java.lang.Object
  |
  +--org.cantaloop.cgimlet.ProjectRunner
Direct Known Subclasses:
Main

public class ProjectRunner
extends java.lang.Object

This class should be used to run a codegeneration process. The commandline entry point (Main) and the ant task (ProjectGeneratorTask) are based on this class.

Version:
0.2.0 ($Revision: 1.4 $)
Author:
Stefan Heimann

Field Summary
protected  boolean m_debug
           
protected  boolean m_prettyPrinting
           
protected  java.io.File m_prjFile
           
protected  boolean m_quiet
           
protected  boolean m_verbose
           
protected static ProjectGenerator s_gen
           
 
Constructor Summary
ProjectRunner()
           
 
Method Summary
static java.lang.String getCopyright()
          Returns the copyright string.
static ProjectGenerator getProjectGenerator()
          Get the project generator of the last run.
static java.lang.String getVersion()
          Returns the version string.
 void run()
          Run the code generation process.
 boolean runAndCatch()
          Run the code codegeneration process, catch all exceptions and dipslay a error message (if necessary).
 void setDebug(boolean b)
          Enables debugging output.
 void setPrettyPrinting(boolean b)
          Set if the generated files should be pretty printed.
 void setProjectFile(java.lang.String s)
          Set the project file as a string.
 void setQuiet(boolean b)
          Set if the codegeneration should be extra quiet.
 void setVerbose(boolean b)
          Set if the codegeneration should be verbose.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

s_gen

protected static ProjectGenerator s_gen

m_verbose

protected boolean m_verbose

m_quiet

protected boolean m_quiet

m_debug

protected boolean m_debug

m_prettyPrinting

protected boolean m_prettyPrinting

m_prjFile

protected java.io.File m_prjFile
Constructor Detail

ProjectRunner

public ProjectRunner()
Method Detail

run

public void run()
         throws CodeGenerationException,
                InternalCodeGenerationException
Run the code generation process.
Throws:
CodeGenerationException - if an error occurs
InternalCodeGenerationException - if an error (which is probably a bug) occurs

runAndCatch

public boolean runAndCatch()
Run the code codegeneration process, catch all exceptions and dipslay a error message (if necessary).
Returns:
true if no exception was thrown during the generation false otherwise.

setVerbose

public void setVerbose(boolean b)
Set if the codegeneration should be verbose.
Parameters:
b - a boolean value

setPrettyPrinting

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

setQuiet

public void setQuiet(boolean b)
Set if the codegeneration should be extra quiet.
Parameters:
b - a boolean value

setProjectFile

public void setProjectFile(java.lang.String s)
Set the project file as a string. You should use `/' as the directory separator char.
Parameters:
s - a String value

setDebug

public void setDebug(boolean b)
Enables debugging output.
Parameters:
b - a boolean value

getProjectGenerator

public static ProjectGenerator getProjectGenerator()
Get the project generator of the last run.
Returns:
a ProjectGenerator value

getVersion

public static final java.lang.String getVersion()
Returns the version string.
Returns:
a String value

getCopyright

public static final java.lang.String getCopyright()
Returns the copyright string.
Returns:
a String value

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