Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rj.tools.jcsc.ant
Class JCSCTask

    java.lang.Object
      |
      +--org.apache.tools.ant.ProjectComponent
            |
            +--org.apache.tools.ant.Task
                  |
                  +--rj.tools.jcsc.ant.JCSCTask

public class JCSCTask
extends org.apache.tools.ant.Task

`JCSCTask`

Version:
  $Revision: 1.27 $
Author:
  Ralph Jocham

Fields inherited from class org.apache.tools.ant.Task
`description, location, target, taskName, taskType, wrapper`

Fields inherited from class org.apache.tools.ant.ProjectComponent
`project`

Constructor Summary
`JCSCTask()`

Method Summary
`void` | `addFileSet(org.apache.tools.ant.types.FileSet fs)` Add a file set include all files to parse
`void` | `execute()` Describe `execute` method here.
`protected void` | `executeFile(rj.tools.jcsc.ant.ParseFile file)` `executeFile` runs JCSC on one File
`protected void` | `executeFiles(rj.tools.jcsc.ant.ParseFile[] files)` `executeFiles` runs JCSC on an array of Files
`protected rj.tools.jcsc.ant.ParseFile[]` | `getFiles()` `getFiles` transforms FileSet into an File array
`void` | `setCopyAssociatedFiles(java.lang.String value)` Copy associated files to destdir
`void` | `setDestdir(java.lang.String dir)` `setDestdir` - the folder into which the output is written to.
`void` | `setFailSeverity(java.lang.String level)` set the level for a found violation to cause a build fail
`void` | `setFailValue(java.lang.String value)` `setFailValue` set the fail value which will cause a failure if the avg violations per ncss is higher.
`void` | `setFile(java.lang.String file)` `setFile` - the name of the single file to check.
`void` | `setJcscHome(java.lang.String home)` The home of JCSC
`void` | `setResultsformatter(java.lang.String resultsFormatter)` `setResultsformatter` - the results formatter to use.
`void` | `setRules(java.lang.String rules)` `setRules` - the rules file to use.
`void` | `setStartDate(java.lang.String date)` `setStartDate` set the date/time from which files are being considered.
`void` | `setStartpackage(java.lang.String startpackage)` `setStartpackage` - the name of the topmost package with the tailing '.' (i.e com.foo....
`void` | `setViolationsSorter(java.lang.String name)` Set the sorting algorithm for how the found violations have to be sorted
`void` | `setWorstCount(int count)` `setWorstCount` - how many files should be part of the hall of 'shame'.

Methods inherited from class org.apache.tools.ant.Task
`getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorOutput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName`

Methods inherited from class org.apache.tools.ant.ProjectComponent
`getProject, setProject`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### JCSCTask

    public JCSCTask()

Method Detail

### setRules

    public void setRules(java.lang.String rules)

  `setRules` - the rules file to use.
  Parameters:
    `rules` - a `String` value

### setFile

    public void setFile(java.lang.String file)

  `setFile` - the name of the single file to check.
  Parameters:
    `file` - a `String` value

### setStartpackage

    public void setStartpackage(java.lang.String startpackage)

  `setStartpackage` - the name of the topmost package with the tailing '.' (i.e com.foo.... would have com.)
  Parameters:
    `startpackage` - a `String` value

### setResultsformatter

    public void setResultsformatter(java.lang.String resultsFormatter)

  `setResultsformatter` - the results formatter to use.
  Parameters:
    `resultsFormatter` - a `String` value

### setDestdir

    public void setDestdir(java.lang.String dir)

  `setDestdir` - the folder into which the output is written to.
  Parameters:
    `dir` - a `String` value

### setWorstCount

    public void setWorstCount(int count)

  `setWorstCount` - how many files should be part of the hall of 'shame'.
  Parameters:
    `count` - an `int` value

### setStartDate

    public void setStartDate(java.lang.String date)

  `setStartDate` set the date/time from which files are being considered. Format YYYY-MM-DD HH:MM:SS
  Parameters:
    `date` - a `String` value

### setFailValue

    public void setFailValue(java.lang.String value)

  `setFailValue` set the fail value which will cause a failure if the avg violations per ncss is higher.
  Parameters:
    `value` - a `String` value

### setViolationsSorter

    public void setViolationsSorter(java.lang.String name)

  Set the sorting algorithm for how the found violations have to be sorted
  Parameters:
    `name` - of class to be uses as algorithm implementation

### setFailSeverity

    public void setFailSeverity(java.lang.String level)

  set the level for a found violation to cause a build fail
  Parameters:
    `level` -

### setCopyAssociatedFiles

    public void setCopyAssociatedFiles(java.lang.String value)

  Copy associated files to destdir
  Parameters:
    `value` -

### setJcscHome

    public void setJcscHome(java.lang.String home)

  The home of JCSC
  Parameters:
    `home` -

### addFileSet

    public void addFileSet(org.apache.tools.ant.types.FileSet fs)

  Add a file set include all files to parse
  Parameters:
    `fs` - a `FileSet` value

### getFiles

    protected rj.tools.jcsc.ant.ParseFile[] getFiles()

  `getFiles` transforms FileSet into an File array
  Returns:
    a `File[]` value

### execute

    public void execute()
                 throws org.apache.tools.ant.BuildException

  Describe `execute` method here.
  Overrides:
    `execute` in class `org.apache.tools.ant.Task`
  Throws:
    `org.apache.tools.ant.BuildException` - if an error occurs

### executeFile

    protected void executeFile(rj.tools.jcsc.ant.ParseFile file)
                        throws org.apache.tools.ant.BuildException

  `executeFile` runs JCSC on one File
  Parameters:
    `file` - a `File` value
  Throws:
    `org.apache.tools.ant.BuildException` - if an error occurs

### executeFiles

    protected void executeFiles(rj.tools.jcsc.ant.ParseFile[] files)
                         throws org.apache.tools.ant.BuildException

  `executeFiles` runs JCSC on an array of Files
  Parameters:
    `files` - a `ParseFile[]` value
  Throws:
    `org.apache.tools.ant.BuildException` - if an error occurs

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

(c) 1999-2004 by Ralph Jocham (rjocham72@netscape.net)
JCSC is released under the terms of the GNU General Public License