org.apache.tools.ant.taskdefs.optional.jdepend
public class JDependTask extends Task
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. |
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()
Adds a path to source code to analyze. |
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. |
File | getDir() |
PatternSet | getExcludes() |
boolean | getFork() |
boolean | getHaltonerror() |
File | getOutputFile() |
Path | getSourcespath()
Gets the sourcepath. |
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(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(String value)
The command used to invoke a forked Java Virtual Machine.
|
void | setOutputFile(File outputFile)
The output file name.
|
void | setTimeout(Long value)
Set the timeout value (in milliseconds).
|
Returns: a classes path
Returns: a classpath
Returns: a pattern for the excludes
Parameters: commandline the commandline to create the argument on
Returns: create a new JVM argument so that any argument can be passed to the JVM.
See Also: JDependTask
Deprecated: since 1.6.x.
Adds a path to source code to analyze.Returns: a source path
Returns: null if there is a timeout value, otherwise the watchdog instance.
Throws: BuildException in case of error
Throws: BuildException if an error occurs
Parameters: commandline the commandline for forked jvm watchdog the watchdog in charge of cancelling the test if it exceeds a certain amount of time. Can be null.
Returns: the result of running the jdepend
Throws: BuildException in case of error
Parameters: commandline the command line
Returns: the return value of the mvm
Throws: BuildException if an error occurs
Returns: the classes path
Returns: the class path used for compilation
Returns: the dir attribute
Returns: the excludes patterns
Returns: the value of the fork attribute
Returns: the value of the haltonerror attribute
Returns: the output file name
Deprecated: since 1.6.x.
Gets the sourcepath.Returns: the sources path
Returns: the timeout value
Parameters: classpath a class path to be used
Parameters: r a classpath reference
Parameters: dir the directory to invoke the JVM from.
See Also: JDependTask
Parameters: value true if a JVM should be forked, otherwise false
Parameters: ea xml or text
Parameters: haltonerror the value to set
Parameters: b include ant run time yes or no
Since: Ant 1.6
Parameters: value the new VM to use instead of java
See Also: JDependTask
Parameters: outputFile the output file name
If the operation is running for more than this value, the jdepend will be canceled. (works only when in 'fork' mode).
Parameters: value the maximum time (in milliseconds) allowed before declaring the test as 'timed-out'
See Also: JDependTask