UML Modeling Techniques > Class modeling > Attributes > Using an attribute signature to specify properties
  
Using an attribute signature to specify properties
Through the Signature of an Attribute, you can perform the following tasks:
Specify the Name of the Attribute
Reference an item to use as the Attribute's Type.
Create an uninterpreted type to use as the Attribute's Type.
Specify the Multiplicity of the Attribute.
Specify a Default for the Attribute.
* 
If an Attribute is set up as a Part or Port and you use its signature to clear its Data Type, all redefinitions of the Attribute will be deleted without warning.
You specify the Type and Name of an Attribute by typing the Signature in the following format:
[<derived>]<attribute name> [: <type>] [ [<multiplicity>]][= <default value>]
where:
<derived> - set to a slash mark (/) when the Attribute is derived.
<attribute name> - is the Attribute's Name.
<type> - is the Attribute's Type. Modeler attempts to match the text you type with items that can be used as Types in the model. If a match is found, the item is referenced as the Type. If no match is found, an uninterpreted type is created. If you do not type any text, the Type is left blank. Ensure that you prefix the type with a colon.
<multiplicity> is the Attribute's Multiplicity. If you do not type any text for <multiplicity>, the Multiplicity is set to Only One. Ensure that you type the multiplicity in brackets.
<default value> - is the Attribute's Default. If you do not type any text for <default>, the Default is left blank. Ensure that you prefix the default name with an equals character.
You can change the Signature of an Attribute in the following ways:
Through the Signature property of an Attribute's Property Pages.
Through the Items tab of a Class', Data Type's, Interface's or Signal's Property Pages - change the entry.
Through an Attribute appearing on a Class Diagram - right-click the Attribute, and then click Edit Signature. When using in-place editing to change a signature on a Class Diagram, use the Ctrl+Return keys to add a return, and use the Enter key to save the changes.
* 
You can set the data type of an Attribute in a Modeler pane by dragging the item you want to be the data type to the Attribute. You can set the data type of an Attribute on a Class Diagram by dragging the item you want to be the data type to the Attribute.
After adding an Attribute to a Class, Data Type, Interface or Signal on a Class Diagram, you right-click the Attribute, click Edit Signature, and then type the following text to replace the default Signature:
/SetToOn : short [*] = On
The preceding Attribute Signature performs the following tasks:
Selects the Derived check box.
Changes the Name of the Attribute to SetToOn.
Sets the Type of the Attribute to short, referencing the short Basic Type.
Sets the Multiplicity of the Attribute to Zero or More.
Sets the Default value of the Attribute to On.