net.mtu.eggplant.dbc
Class Configuration

java.lang.Object
  extended bynet.mtu.eggplant.dbc.Configuration

public class Configuration
extends Object

Holds all the option values.

Version:
$Revision: 1.7 $

Nested Class Summary
static class Configuration.SourceCompatibilityEnum
          Enum for which version of source compatibility we're using.
 
Field Summary
static Configuration.SourceCompatibilityEnum JAVA_1_3
          Enum for 1.3 source compatibility.
static Configuration.SourceCompatibilityEnum JAVA_1_4
          Enum for 1.4 source compatibility.
 
Constructor Summary
Configuration()
           
 
Method Summary
 String createDirectoryForPackage(String packageName)
          Take a package name that's passed in and turn it into a directory name and create the directories relative to the instrumented directory path.
 String getDestinationDirectory()
           
 String getInstrumentedExtension()
           
 String getInstrumentedFilename(File sourceFile, String packageName)
           
 Configuration.SourceCompatibilityEnum getSourceCompatibility()
           
 String getSourceExtension()
           
 boolean ignoreTimeStamp()
           
 boolean isPrettyOutput()
          If carriage returns should be output in generated code.
 boolean isVerbose()
          Should we be verbose about what we're doing?
 void setDestinationDirectory(String dir)
          Set the directory where the instrumented files should go.
 void setExtensions(String sourceExtension, String instrumentedExtension)
           
 void setIgnoreTimeStamp(boolean b)
           
 void setInstrumentedExtension(String instrumentedExtension)
           
 void setPrettyOutput(boolean b)
           
 void setSourceCompatibility(Configuration.SourceCompatibilityEnum sc)
          Set the source compatibility for the parser.
 void setSourceExtension(String sourceExtension)
           
 void setVerbose(boolean v)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JAVA_1_4

public static final Configuration.SourceCompatibilityEnum JAVA_1_4
Enum for 1.4 source compatibility.

See Also:
setSourceCompatibility(Configuration.SourceCompatibilityEnum)

JAVA_1_3

public static final Configuration.SourceCompatibilityEnum JAVA_1_3
Enum for 1.3 source compatibility.

See Also:
setSourceCompatibility(Configuration.SourceCompatibilityEnum)
Constructor Detail

Configuration

public Configuration()
Method Detail

setSourceCompatibility

public void setSourceCompatibility(Configuration.SourceCompatibilityEnum sc)
Set the source compatibility for the parser. Defaults to JAVA_1_3.

See Also:
JAVA_1_4, JAVA_1_3
PreConditions
(null != sc)

getSourceCompatibility

public Configuration.SourceCompatibilityEnum getSourceCompatibility()

ignoreTimeStamp

public boolean ignoreTimeStamp()
Returns:
true if files are to be parsed reguardless of the timestamp.

setIgnoreTimeStamp

public void setIgnoreTimeStamp(boolean b)
See Also:
ignoreTimeStamp()

setExtensions

public void setExtensions(String sourceExtension,
                          String instrumentedExtension)
See Also:
setSourceExtension(String), setInstrumentedExtension(String)

getSourceExtension

public String getSourceExtension()
Returns:
the extension for the source files

getInstrumentedExtension

public String getInstrumentedExtension()
Returns:
the extension for the instrumented files

setSourceExtension

public void setSourceExtension(String sourceExtension)
Parameters:
sourceExtension - the extension on the source files, defaults to 'java'

setInstrumentedExtension

public void setInstrumentedExtension(String instrumentedExtension)
Parameters:
instrumentedExtension - the extension on the instrumented files, defaults to 'java'

createDirectoryForPackage

public String createDirectoryForPackage(String packageName)
Take a package name that's passed in and turn it into a directory name and create the directories relative to the instrumented directory path.

Returns:
the directory to put the file in

getDestinationDirectory

public String getDestinationDirectory()
See Also:
setDestinationDirectory(String)

setDestinationDirectory

public void setDestinationDirectory(String dir)
Set the directory where the instrumented files should go. Directories will be created under this directory for the packages. Defaults to "instrumented".


getInstrumentedFilename

public String getInstrumentedFilename(File sourceFile,
                                      String packageName)
Returns:
the instrumented filename to use, without the path

isPrettyOutput

public final boolean isPrettyOutput()
If carriage returns should be output in generated code. Defaults to false.


setPrettyOutput

public final void setPrettyOutput(boolean b)
See Also:
isPrettyOutput()

isVerbose

public final boolean isVerbose()
Should we be verbose about what we're doing? Defaults to false.


setVerbose

public final void setVerbose(boolean v)
See Also:
isVerbose()