|Prev - Next - Down||SDMetrics - the UML design measurement tool|
The "nesting" attribute takes the values "true" or "false" (default). When "nesting" is set to true for a project metric m for type t, the metric is recursively applied to all "compatible" elements in the projection. An element is "compatible" if its type is t, or if its type is a subtype or supertype of t and metric m is also defined for the type. The maximum value of all values returned, increased by one, is the value of the metric. Example:
<metric name="DIT" domain="class"> <description>Depth of the class in the inheritance tree.</description> <projection relation="genchild" target="generalization" element="genparent" eltype="class" nesting="true"/> </metric>Without the nesting="true" attribute, the above metric would simply count the number of parent classes of a class. With "nesting" set to true, the meaning of the metric changes as follows: calculate the DIT for all parents of the class, take the maximum DIT over all parent classes, increase it by one. As a result, this metric calculates the longest path from the class to the root in the inheritance graph.
The "nesting" attribute cannot be combined with the "sum" attribute or the "recurse" attribute. It can, however, be combined with all other attributes, including the filter attributes (target, targetcondition, element, eltype, scope, condition). Recursive calls are not applied to elements that do not fulfill the filter criteria.
|Section 126.96.36.199 "Attribute "recurse""||Contents||Section 188.8.131.52 "Summary of Projection Attributes"|