UML Designer User's Guide

Changing message parameter types

In addition to the attributes, the messages of <CatalogEntry> also need to be changed to have parameters and return values of the correct types. To change the parameter types, follow these steps:

  1. Select accessionNumber: in the Contents pane of the Path Browser.

    The default navigation for a message specification, Characterized by, appears in the third pane. This navigation shows all of the parameters and return values of the selected message specification. (If you wanted to see only the input parameters, you could select the Parameters navigation in the third pane).

  2. Select anAccessionNumber in the Characterized by pane.

    The default navigation for a parameter, Types, appears in the fourth pane. This navigation shows the types (protocols) currently linked to this parameter. Currently, the type is defaulted to <Object>.

  3. Select Link>Types from the pop-up menu of anAccessionNumber. A window appears prompting you to select which object types should be linked to the selected parameter.
  4. Use the << and >> buttons to add <Integer> to the Linked list and remove <Object>. Select OK when you are finished.
  5. Use the same procedure to change the parameter types for the other setter methods, author: and title:. Both should take parameters of type <String>.

Changing return value types

Changing a return value type is similar to changing a parameter type. To change the return value types for the messages of <CatalogEntry>, follow these steps:

  1. Select accessionNumber: in the Contents pane of the Path Browser.
  2. Select returns in the Characterized by pane. The Type pane indicates that the return type is currently unspecified.
  3. Select Link>Types from the pop-up menu of returns. A window appears prompting you to select which object type should be linked to the selected parameter.
  4. Use the >> to add <Integer> to the Linked list. You do not need to remove anything from the list; a return value has only one type by definition, so the previous value is automatically removed. Select OK when you are finished.
  5. Use the same procedure to change the parameter types for the other methods. accessionNumber should return <Integer>, while the getter and setter methods for author and title should all return <String>.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]