Prev - Next - Down | SDMetrics - the UML design measurement tool |
Rule: Unnamed | Category: Completeness |
Severity: 1-high | Applies to: all areas |
Class has no name. Give the class a descriptive name that reflects its purpose. Unnamed classes will cause problems during code generation.
|
Rule: Unused | Category: Completeness |
Severity: 1-high | Applies to: all areas |
The class is not used anywhere. The class has no child classes, dependencies, or associations, and it is not used as parameter or property type. You'll probably still need to model the clients of the class, or else consider deleting the class from the model. Note: for models that were reverse-engineered from source code, this rule may falsely report many classes as "unused". This happens for classes that are only referenced in method implementations, e.g., via local variables.
|
Rule: NotCapitalized | Category: Naming |
Severity: 3-low | Applies to: all areas |
Class names should start with a capital letter. This naming convention is a recommended style guideline in the UML standards [OMG03], [OMG05]. |
Rule: GodClass | Category: Style |
Severity: 2-med | Applies to: all areas |
The class has more than 60 attributes and operations. Also known as blob classes, large classes are likely maintenance bottlenecks, sources of unreliability, and indicate a lack of (object-oriented) architecture and architecture enforcement. Consider refactoring the class to split it up into smaller classes. |
Rule: Keyword | Category: Naming |
Severity: 2-med | Applies to: design |
Class name is a Java or C++ keyword. Using programming language keywords for class names will cause problems during code generation. Find another name for the class. Capitalizing the name will also help, see rule NotCapitalized.
|
Rule: MultipleInheritance | Category: Style |
Severity: 3-low | Applies to: all areas |
Use of multiple inheritance - class has more than one parent. The use of multiple inheritance is controversial. Some OO programming languages do not support multiple inheritance. Review the class design to confirm that the use of multiple inheritance is justified.
|
Rule: SpecLeafClass | Category: Correctness |
Severity: 1-high | Applies to: all areas |
Class is marked as leaf, but it has child classes. Leaf classes cannot have any child classes. This is a WFR of the UML. |
Rule: NoSpec | Category: Completeness |
Severity: 2-med | Applies to: all areas |
Abstract class has no child classes. Abstract classes cannot be instantiated. Without specializations that can be instantiated, the abstract class is useless.
|
Rule: CyclicInheritance | Category: Inheritance |
Severity: 1-high | Applies to: all areas |
Class inherits from itself directly or indirectly. The inheritance graph must be a tree, no cycles are allowed.
|
Rule: ConcreteSuper | Category: Style |
Severity: 1-high | Applies to: all areas |
The abstract class has a parent class that is not abstract. This is bad design. A child class should be substitutable for the parent class. Since the parent class can be instantiated, but not the child class, substitution is not possible anymore.
|
Rule: DupOps | Category: Correctness |
Severity: 1-high | Applies to: all areas |
Class has duplicate operations. There are two or more operations with identical signatures (i.e., operation name and list of parameter types). Operation signatures must be unique within the class.
|
Rule: DupAttrNames | Category: Correctness |
Severity: 1-high | Applies to: all areas |
The class has two or more properties with identical names. Attribute names must be unique within the class.
|
Rule: AttrNameOvr | Category: Naming |
Severity: 2-med | Applies to: all areas |
The class defines a property of the same name as an inherited attribute. During code generation, this may inadvertently hide the attribute of the parent class. Consider changing the name of the attribute in the child class.
|
Rule: DescendentRef | Category: Style |
Severity: 1-high | Applies to: all areas |
The class references a descendent class via associations, UML dependencies, attribute or parameter types. This is poor design. A class c should be oblivious of its descendent classes. The reference to the descendent class and the inheritance links back to class c effectively form a dependency cycle between these classes. Redesign this to eliminate the need for the reference to the descendent class. |
Rule: DepCycle | Category: Style |
Severity: 2-med | Applies to: all areas |
The class has circular references. Circular dependencies should be avoided. The classes participating in the cycle cannot be tested and reused independently. The more classes participate in the cycle, the worse the problem is, especially if the classes reside in different packages (see also rule DepCycle for packages). Consider revising the design to eliminate the cycle.
|
Prev | Up | Next |
Appendix C: "List of Design Rules" | Contents | Appendix C.2 "Interface Rules" |