+49 (30) 467086-20 service@microtool.de
Products » objectiF RPM » System development » Class » Define Data Types for Attributes and Methods

Define Data Types for Attributes and Methods

Various data types (i.e. Integer, String, Number) can be defined for attributes and methods. By default, they are stored in the System Architecture/ Data Model package, however, you can also select a different package. 

Note
If you want to subsequently assign a data type to an attribute or method, the data type usually has to be stored in the same package as the attribute or method to which you are trying to assign it. However, it’s also possible to assign data types to attributes or methods that are stored in different packages. 
Create Data Type
  • In the context menu of a package, select the command Create/ Class.
  • Enter a name for the class; this should be the same name as the type you will later select. Set the stereotype to SemanticType.
Create Attribute and Assign Data Type
  1. In the context menu of a class, execute the command Create/ Attribute.
  2. Name the attribute.
  3. Click on the field Declaration and delete the object entry.
  1. Choose a data type from the list. Data types can be identified by the word Type that precede them.
  1. Click OK to save your changes.
Specify Visibility

In addition to selecting a data type, you can also specify the visibility of the attribute or method. If nothing is declared, the default visibility is public. The visibility value needs to be placed in front of the data type.

  • In the Declaration field, click before the first letter of the data type and enter the first letter of the modifier (i.e. “p” for private).
  • Select your desired modifier.
  • Click OK to save your changes.