|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.tools.ant.ProjectComponent | +--org.apache.tools.ant.Task | +--org.apache.tools.ant.taskdefs.optional.jdepend.JDependTask
Runs JDepend tests.
JDepend is a tool to generate design quality metrics for each Java package. It has been initially created by Mike Clark. JDepend can be found at http://www.clarkware.com/software/JDepend.html. The current implementation spawn a new Java VM.
Nested Class Summary | |
static class |
JDependTask.FormatAttribute
A class for the enumerated attribute format, values are xml and text. |
Field Summary |
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 | |
JDependTask()
|
Method Summary | |
Path |
createClassespath()
Adds a path to class code to analyze. |
Path |
createClasspath()
Adds a path to the classpath. |
PatternSet.NameEntry |
createExclude()
add a name entry on the exclude list |
Commandline.Argument |
createJvmarg(CommandlineJava commandline)
Create a new JVM argument. |
Path |
createSourcespath()
Deprecated. |
protected ExecuteWatchdog |
createWatchdog()
|
void |
execute()
execute the task |
int |
executeAsForked(CommandlineJava commandline,
ExecuteWatchdog watchdog)
Execute the task by forking a new JVM. |
int |
executeInVM(CommandlineJava commandline)
Execute inside VM. |
Path |
getClassespath()
Gets the classespath. |
Path |
getClasspath()
Gets the classpath to be used for this compilation. |
java.io.File |
getDir()
|
PatternSet |
getExcludes()
|
boolean |
getFork()
|
boolean |
getHaltonerror()
|
java.io.File |
getOutputFile()
|
Path |
getSourcespath()
Deprecated. |
java.lang.Long |
getTimeout()
|
void |
setClasspath(Path classpath)
Set the classpath to be used for this compilation. |
void |
setClasspathRef(Reference r)
Adds a reference to a classpath defined elsewhere. |
void |
setDir(java.io.File dir)
The directory to invoke the VM in. |
void |
setFork(boolean value)
If true, forks into a new JVM. |
void |
setFormat(JDependTask.FormatAttribute ea)
The format to write the output in, "xml" or "text". |
void |
setHaltonerror(boolean haltonerror)
Whether or not to halt on failure. |
void |
setIncluderuntime(boolean b)
If true, include jdepend.jar in the forked VM. |
void |
setJvm(java.lang.String value)
The command used to invoke a forked Java Virtual Machine. |
void |
setOutputFile(java.io.File outputFile)
The output file name. |
void |
setTimeout(java.lang.Long value)
Set the timeout value (in milliseconds). |
Methods inherited from class org.apache.tools.ant.Task |
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
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 |
public JDependTask()
Method Detail |
public void setIncluderuntime(boolean b)
b
- include ant run time yes or nopublic void setTimeout(java.lang.Long value)
If the operation is running for more than this value, the jdepend will be canceled. (works only when in 'fork' mode).
value
- the maximum time (in milliseconds) allowed before
declaring the test as 'timed-out'setFork(boolean)
public java.lang.Long getTimeout()
public void setOutputFile(java.io.File outputFile)
outputFile
- the output file namepublic java.io.File getOutputFile()
public void setHaltonerror(boolean haltonerror)
haltonerror
- the value to setpublic boolean getHaltonerror()
public void setFork(boolean value)
value
- true if a JVM should be forked,
otherwise falsepublic boolean getFork()
public void setJvm(java.lang.String value)
value
- the new VM to use instead of javasetFork(boolean)
public Path createSourcespath()
public Path getSourcespath()
public Path createClassespath()
public Path getClassespath()
public void setDir(java.io.File dir)
dir
- the directory to invoke the JVM from.setFork(boolean)
public java.io.File getDir()
public void setClasspath(Path classpath)
classpath
- a class path to be usedpublic Path getClasspath()
public Path createClasspath()
public Commandline.Argument createJvmarg(CommandlineJava commandline)
commandline
- the commandline to create the argument on
setFork(boolean)
public void setClasspathRef(Reference r)
r
- a classpath referencepublic PatternSet.NameEntry createExclude()
public PatternSet getExcludes()
public void setFormat(JDependTask.FormatAttribute ea)
ea
- xml or textpublic void execute() throws BuildException
execute
in class Task
BuildException
- if an error occurspublic int executeInVM(CommandlineJava commandline) throws BuildException
commandline
- the command line
BuildException
- if an error occurspublic int executeAsForked(CommandlineJava commandline, ExecuteWatchdog watchdog) throws BuildException
commandline
- the commandline for forked jvmwatchdog
- the watchdog in charge of cancelling the test if it
exceeds a certain amount of time. Can be null.
BuildException
- in case of errorprotected ExecuteWatchdog createWatchdog() throws BuildException
BuildException
- in case of error
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |