The Dependency sensor data type represents dependencies, or couplings, between objects in a software system. Each instance of the SDT can be thought of as representing one "node" in a dependency graph, in the sense that it includes the name of the object (typically a class, method, or package), the list of 'in-coming' dependencies (or couplings) to that object, and the list of 'out-going' dependencies (or couplings) from that object. Table 25.10, “Dependency SDT attributes” documents the complete list of attributes of this sensor data type.
Table 25.10. Dependency SDT attributes
| Attribute | Description |
|---|---|
| tstamp | The UTC time at which this data was collected. |
| tool | A string indicating the tool that collected this data, such as "DependencyFinder". |
| runTime | An tag that is used in analysis to identify the set of all Dependency SDT instances that were generated from a single invocation of the dependency tool. Typically, this value is the UTC time (converted to milliseconds) the dependency measurement was taken. This tag will be different from the tstamp, which will have a unique value for each Dependency SDT instance. |
| granularity | The type of object for which dependencies, or couplings, are being measured, such as "method", "class", "package", etc. |
| path | The fully qualified path of the object whose dependencies are being calculated. |
| inbound | A comma-separated list of inbound resources. For example, if class Foo "is used by" class Bar, then Foo would be the "name" and Bar would be in the list of inbound resources. |
| outbound | A comma-separated list of outbound resources. For example, if class Foo "uses" class Bar, then Foo would be the "name" and Bar would be in the list of outbound resources. |
Dependency Finder and JDepend are an open source tools for extracting dependency information from Java programs. We provide a sensors for this tools that generates Dependency SDT instances.