org.codehaus.groovy.control
Class CompilerConfiguration

java.lang.Object
  extended byorg.codehaus.groovy.control.CompilerConfiguration

public class CompilerConfiguration
extends Object

Compilation control flags and coordination stuff.

Version:
$Id: CompilerConfiguration.java,v 1.2 2004/04/20 01:32:07 cpoirier Exp $
Author:
Chris Poirier

Field Summary
static CompilerConfiguration DEFAULT
           
 
Constructor Summary
CompilerConfiguration()
          Sets the Flags to defaults.
CompilerConfiguration(Properties configuration)
          Sets the Flags to the specified configuration, with defaults for those not supplied.
 
Method Summary
 List getClasspath()
          Gets the classpath.
 boolean getDebug()
          Returns true if debugging operation has been requested.
 PrintWriter getOutput()
          Gets the currently configured output writer.
 String getScriptBaseClass()
          Gets the name of the base class for scripts.
 String getSourceEncoding()
          Gets the currently configured source file encoding.
 File getTargetDirectory()
          Gets the target directory for writing classes.
 int getTolerance()
          Returns the requested error tolerance.
 boolean getVerbose()
          Returns true if verbose operation has been requested.
 int getWarningLevel()
          Gets the currently configured warning level.
 void setClasspath(String classpath)
          Sets the output writer.
 void setDebug(boolean debug)
          Turns debugging operation on or off.
 void setOutput(PrintWriter output)
          Sets the output writer.
 void setScriptBaseClass(String scriptBaseClass)
          Sets the name of the base class for scripts.
 void setSourceEncoding(String encoding)
          Sets the encoding to be used when reading source files.
 void setTargetDirectory(File directory)
          Sets the target directory.
 void setTargetDirectory(String directory)
          Sets the target directory.
 void setTolerance(int tolerance)
          Sets the error tolerance, which is the number of non-fatal errors (per unit) that should be tolerated before compilation is aborted.
 void setVerbose(boolean verbose)
          Turns verbose operation on or off.
 void setWarningLevel(int level)
          Sets the warning level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT

public static final CompilerConfiguration DEFAULT
Constructor Detail

CompilerConfiguration

public CompilerConfiguration()
Sets the Flags to defaults.


CompilerConfiguration

public CompilerConfiguration(Properties configuration)
                      throws ConfigurationException
Sets the Flags to the specified configuration, with defaults for those not supplied.

Method Detail

getWarningLevel

public int getWarningLevel()
Gets the currently configured warning level. See WarningMessage for level details.


setWarningLevel

public void setWarningLevel(int level)
Sets the warning level. See WarningMessage for level details.


getSourceEncoding

public String getSourceEncoding()
Gets the currently configured source file encoding.


setSourceEncoding

public void setSourceEncoding(String encoding)
Sets the encoding to be used when reading source files.


getOutput

public PrintWriter getOutput()
Gets the currently configured output writer.


setOutput

public void setOutput(PrintWriter output)
Sets the output writer.


getTargetDirectory

public File getTargetDirectory()
Gets the target directory for writing classes.


setTargetDirectory

public void setTargetDirectory(String directory)
Sets the target directory.


setTargetDirectory

public void setTargetDirectory(File directory)
Sets the target directory.


getClasspath

public List getClasspath()
Gets the classpath.


setClasspath

public void setClasspath(String classpath)
Sets the output writer.


getVerbose

public boolean getVerbose()
Returns true if verbose operation has been requested.


setVerbose

public void setVerbose(boolean verbose)
Turns verbose operation on or off.


getDebug

public boolean getDebug()
Returns true if debugging operation has been requested.


setDebug

public void setDebug(boolean debug)
Turns debugging operation on or off.


getTolerance

public int getTolerance()
Returns the requested error tolerance.


setTolerance

public void setTolerance(int tolerance)
Sets the error tolerance, which is the number of non-fatal errors (per unit) that should be tolerated before compilation is aborted.


getScriptBaseClass

public String getScriptBaseClass()
Gets the name of the base class for scripts. It must be a subclass of Script.


setScriptBaseClass

public void setScriptBaseClass(String scriptBaseClass)
Sets the name of the base class for scripts. It must be a subclass of Script.



Copyright © 2003-2004 The Codehaus. All Rights Reserved.