Contents > 8 Defining Custom Design Metrics and Rules > 8.1 Definition of Metrics > 8.1.6 Signature

8.1.6 Signature

The signature procedure is a special purpose procedure used to capture the signature (name and parameter list) of an operation.
<metric name="Signature" domain="operation" >
  <description>The signature of an operation.</description>
  <signature name="name" set="OPParameters"
   element="parametertype" />
</metric>
The attribute name defines a metric expression which is evaluated and used as name of the signature. In the above case, the metric expression refers to the model element attribute "name" of the operation. The elements that constitute the parameter list are specified by attributes set and element, which we already know from set operations. We define a set of parameters of an operation (Section 8.2 "Definition of Sets"), and specify this set in the set expression. With attribute element, we access the type of each parameter, instead of the parameter itself.

The result is a string that contains the name of the operation, and the IDs of the types of the parameters in the order the parameters are defined in the XMI source file.