org.quilt.reports
Class FmtSelector

java.lang.Object
  |
  +--org.quilt.reports.FmtSelector

public class FmtSelector
extends java.lang.Object


Constructor Summary
FmtSelector()
           
 
Method Summary
 Formatter createFormatter()
          Ant-compatible method for creating formatters.
 java.lang.String getClassname()
           
 java.lang.String getExtension()
          Get the extension of the formatter output file.
 boolean getUseFile()
           
 boolean isKnownType(java.lang.String t)
           
 void setClassname(java.lang.String classname)
          Ant-compatible method for selecting formatter by class name.
 void setExtension(java.lang.String ext)
          Ant-compatible method for setting the extension of the formatter output file.
 void setOutfile(java.io.File out)
          Ant-compatible method for setting the base name of the output file.
 void setOutput(java.io.OutputStream out)
           
 void setType(java.lang.String t)
          Routine called by Ant to set the formatter using an alias.
 void setUseFile(boolean b)
          Ant-compatible method for enabling output to a file.
 java.lang.String toString()
          Converts some class information to String format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FmtSelector

public FmtSelector()
Method Detail

createFormatter

public Formatter createFormatter()
                          throws org.apache.tools.ant.BuildException
Ant-compatible method for creating formatters. Either the type or the classname must be specified in the build file or on the command line.

Returns:
Formatter as an object
org.apache.tools.ant.BuildException

isKnownType

public boolean isKnownType(java.lang.String t)
Returns:
Whether the String passed is an alias for a standard formatter

setType

public void setType(java.lang.String t)
Routine called by Ant to set the formatter using an alias. This is an attribute of the formatter element. Example

      <formatter type="plain">

 

Parameters:
t - 'Type' of the formatter (brief, plain, summary, xml)

getClassname

public java.lang.String getClassname()
Returns:
the class name of the formatter

setClassname

public void setClassname(java.lang.String classname)
Ant-compatible method for selecting formatter by class name.


getExtension

public java.lang.String getExtension()
Get the extension of the formatter output file. Defaults to ".txt". (This differs from the Ant JUnitTask, which requires that the extension be specified if the formatter is selected by class name.)

Returns:
The extension as a String.

setExtension

public void setExtension(java.lang.String ext)
Ant-compatible method for setting the extension of the formatter output file.

See Also:
setOutfile(java.io.File)

setOutfile

public void setOutfile(java.io.File out)
Ant-compatible method for setting the base name of the output file.

See Also:
setExtension(java.lang.String)

setOutput

public void setOutput(java.io.OutputStream out)

getUseFile

public boolean getUseFile()
Returns:
Whether output to a file is enabled.

setUseFile

public void setUseFile(boolean b)
Ant-compatible method for enabling output to a file. Defaults to true.


toString

public java.lang.String toString()
Converts some class information to String format.

Overrides:
toString in class java.lang.Object
Returns:
The string.


Copyright © 2001-2003 Apache Software Foundation. All Rights Reserved.