Package jdepend.textui
Class JDepend
java.lang.Object
jdepend.textui.JDepend
- Direct Known Subclasses:
JDepend
The
JDepend class analyzes directories of Java class files,
generates metrics for each Java package, and reports the metrics in a textual
format.- Author:
- Mike Clark, Clarkware Consulting, Inc.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJDepend()Constructs aJDependinstance using standard output.JDepend(PrintWriter writer) Constructs aJDependinstance with the specified writer. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDirectory(String name) Adds the specified directory name to the collection of directories to be analyzed.voidanalyze()Analyzes the registered directories, generates metrics for each Java package, and reports the metrics.voidanalyzeInnerClasses(boolean b) Determines whether inner classes are analyzed.protected PrintWriterprotected voidinstanceMain(String[] args) static voidprotected voidprintAbstractClasses(JavaPackage jPackage) protected voidprotected voidprotected voidprintAfferents(JavaPackage jPackage) protected voidprotected voidprotected voidprotected voidprintClassName(JavaClass jClass) protected voidprintConcreteClasses(JavaPackage jPackage) protected voidprotected voidprotected voidprintCycle(JavaPackage jPackage) protected voidprintCycleContributor(JavaPackage jPackage) protected voidprotected voidprintCycleHeader(JavaPackage jPackage) protected voidprintCycles(Collection packages) protected voidprotected voidprotected voidprintCycleTarget(JavaPackage jPackage) protected voidprintEfferents(JavaPackage jPackage) protected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprintPackage(JavaPackage jPackage) protected voidprintPackageFooter(JavaPackage jPackage) protected voidprintPackageHeader(JavaPackage jPackage) protected voidprintPackageName(JavaPackage jPackage) protected voidprintPackages(Collection packages) protected voidprotected voidprotected voidprotected voidprintStatistics(JavaPackage jPackage) protected voidprintSummary(Collection packages) voidsetComponents(String components) Sets the comma-separated list of components.voidsetFilter(PackageFilter filter) Sets the package filter.voidsetWriter(PrintWriter writer) Sets the output writer.protected Stringtab()protected Stringtab(int n) protected StringtoFormattedString(float f) protected void
-
Field Details
-
formatter
-
-
Constructor Details
-
JDepend
public JDepend()Constructs aJDependinstance using standard output. -
JDepend
Constructs aJDependinstance with the specified writer.- Parameters:
writer- Writer.
-
-
Method Details
-
setWriter
Sets the output writer.- Parameters:
writer- Output writer.
-
getWriter
-
setFilter
Sets the package filter.- Parameters:
filter- Package filter.
-
setComponents
Sets the comma-separated list of components. -
addDirectory
Adds the specified directory name to the collection of directories to be analyzed.- Parameters:
name- Directory name.- Throws:
IOException- If the directory does not exist.
-
analyzeInnerClasses
public void analyzeInnerClasses(boolean b) Determines whether inner classes are analyzed.- Parameters:
b-trueto analyze inner classes;falseotherwise.
-
analyze
public void analyze()Analyzes the registered directories, generates metrics for each Java package, and reports the metrics. -
printPackages
-
printPackage
-
printAbstractClasses
-
printConcreteClasses
-
printEfferents
-
printAfferents
-
printCycles
-
printCycle
-
printHeader
protected void printHeader() -
printPackagesHeader
protected void printPackagesHeader() -
printNoStats
protected void printNoStats() -
printPackageHeader
-
printStatistics
-
printClassName
-
printPackageName
-
printAbstractClassesHeader
protected void printAbstractClassesHeader() -
printConcreteClassesHeader
protected void printConcreteClassesHeader() -
printEfferentsHeader
protected void printEfferentsHeader() -
printEfferentsError
protected void printEfferentsError() -
printAfferentsHeader
protected void printAfferentsHeader() -
printAfferentsError
protected void printAfferentsError() -
printCyclesHeader
protected void printCyclesHeader() -
printCycleHeader
-
printCycleTarget
-
printCycleContributor
-
printSummary
-
printSectionBreak
protected void printSectionBreak() -
toFormattedString
-
tab
-
tab
-
usage
-
instanceMain
-
main
-