org.apache.tools.ant.taskdefs.optional.metamata

Class MAudit

public class MAudit extends AbstractMetamataTask

Invokes the Metamata Audit/ Webgain Quality Analyzer on a set of Java files.

maudit performs static analysis of the Java source code and byte code files to find and report errors of style and potential problems related to performance, maintenance and robustness. As a convenience, a stylesheet is given in etc directory, so that an HTML report can be generated from the XML file.

Constructor Summary
MAudit()
default constructor
Method Summary
protected voidcheckOptions()
validate the settings
protected voidcleanUp()
PathcreateRulespath()
classpath for additional audit rules these must be placed before metamata.jar !
PathcreateSearchpath()
search path to use for unused global declarations; required when unused is set.
protected ExecuteStreamHandlercreateStreamHandler()
protected VectorgetOptions()
create the option vector for the command
voidsetExit(boolean flag)
flag to tell the task to exit after the first error. internal/testing only
voidsetFix(boolean flag)
Automatically fix certain errors (those marked as fixable in the manual); optional, default=false
voidsetFullsemanticize(boolean flag)
internal/testing only
voidsetList(boolean flag)
Creates listing file for each audited file; optional, default false.
voidsetOffsets(boolean flag)
internal/testing only
voidsetQuiet(boolean flag)
flag to suppress copyright and summary messages; default false. internal/testing only
voidsetTofile(File outFile)
The XML file to which the Audit result should be written to; required
voidsetUnused(boolean flag)
Finds declarations unused in search paths; optional, default false.
voidsetVerbose(boolean flag)
flag to print all messages; optional, default false. internal/testing only

Constructor Detail

MAudit

public MAudit()
default constructor

Method Detail

checkOptions

protected void checkOptions()
validate the settings

cleanUp

protected void cleanUp()

createRulespath

public Path createRulespath()
classpath for additional audit rules these must be placed before metamata.jar !!

createSearchpath

public Path createSearchpath()
search path to use for unused global declarations; required when unused is set.

createStreamHandler

protected ExecuteStreamHandler createStreamHandler()

getOptions

protected Vector getOptions()
create the option vector for the command

setExit

public void setExit(boolean flag)
flag to tell the task to exit after the first error. internal/testing only

UNKNOWN: ignore="true"

setFix

public void setFix(boolean flag)
Automatically fix certain errors (those marked as fixable in the manual); optional, default=false

setFullsemanticize

public void setFullsemanticize(boolean flag)
internal/testing only

UNKNOWN: ignore="true"

setList

public void setList(boolean flag)
Creates listing file for each audited file; optional, default false. When set, a .maudit file will be generated in the same location as the source file.

setOffsets

public void setOffsets(boolean flag)
internal/testing only

UNKNOWN: ignore="true"

setQuiet

public void setQuiet(boolean flag)
flag to suppress copyright and summary messages; default false. internal/testing only

UNKNOWN: ignore="true"

setTofile

public void setTofile(File outFile)
The XML file to which the Audit result should be written to; required

setUnused

public void setUnused(boolean flag)
Finds declarations unused in search paths; optional, default false. It will look for unused global declarations in the source code within a use domain specified by the searchpath element.

setVerbose

public void setVerbose(boolean flag)
flag to print all messages; optional, default false. internal/testing only

UNKNOWN: ignore="true"

Copyright B) 2000-2007 Apache Software Foundation. All Rights Reserved.