PowerDesigner provides default model checks to verify the validity of class and interface operations.
Check |
Description and Correction |
---|---|
Name/Code contains terms not in glossary |
[if glossary enabled] Names and codes must contain only approved terms drawn from the glossary.
|
Name/Code contains synonyms of glossary terms |
[if glossary enabled] Names and codes must not contain synonyms of glossary terms.
|
Name/Code uniqueness |
Object names must be unique in the namespace.
|
Return type assignment |
The return type of an operation should be defined.
|
Parameter data type assignment |
The data type of a parameter should be defined. Moreover, its type cannot be void.
|
Abstract operation body |
[classes] Abstract operations in a class cannot be implemented.
|
Abstract operation in a instantiable class |
[classes] Abstract operations must be declared in abstract classes only.
|
Overloading operations signature |
[classes] Overloaded operations with the same name and same parameters data type cannot have different return types in a class. Overloading an operation refers to using the same method name but performing different operations based on different parameter number or type.
|
Overriding operations |
[classes] When overriding a parent operation in a class, it is impossible to change its modifiers. Overriding an operation means that an operation defined in a given class is redefined in a child class, in this case the operation of the parent class is said to be overriden.
|
Enum: Constants must overload abstract method |
[classes] You can give each enum constant a different behavior by declaring an abstract method in the enum type and overloading it with a concrete method for each constant. In this case, each constant must overload the abstract method.
|