Package net.sourceforge.pmd.dcd
Class DCD
- java.lang.Object
-
- net.sourceforge.pmd.dcd.DCD
-
@Deprecated public final class DCD extends Object
Deprecated.DCD was never fully implemented, it has not been touched since the initial commit in 2008. All its codebase will be removed for PMD 7.0.0. Do not use it.The Dead Code Detector is used to find dead code. What is dead code? Dead code is code which is not used by other code? It exists, but it not used. Unused code is clutter, which can generally be a candidate for removal.When performing dead code detection, there are various sets of files/classes which must be identified. An analogy of the dead code analysis as a foot race is used to help clarify each of these sets:
- The direct users is the set of Classes which will always be parsed to determine what code they use. This set is the starting point of the race.
- The indirect users is the set of Classes which will only be parsed if they are accessed by code in the direct users set, or in the indirect users set. This set is the course of the race.
- The dead code candidates are the set of Classes which are the focus of the dead code detection. This set is the finish line of the race.
Typically there is intersection between the set of direct users, indirect users and dead code candidates, although it is not required. If the sets are defined too tightly, there the potential for a lot of code to be considered as dead code. You may need to expand the direct users or indirect users sets, or explore using different options.
- Author:
- Ryan Gustafson <ryan.gustafson@gmail.com>
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static void
dump(UsageGraph usageGraph, boolean verbose)
Deprecated.static void
main(String[] args)
Deprecated.static void
report(UsageGraph usageGraph, boolean verbose)
Deprecated.
-
-
-
Method Detail
-
dump
public static void dump(UsageGraph usageGraph, boolean verbose)
Deprecated.
-
report
public static void report(UsageGraph usageGraph, boolean verbose)
Deprecated.
-
-