Architecting and designing : UML 2.0 Lite : UML models : UML class diagrams : Methods and operations : Other properties for a method
  
Other properties for a method
REQTEXT
Stereotype
You may specify a method stereotype in the Stereotype list box of the method definition. Three stereotypes are provided as a default: get, let, and set. You may type your own stereotype in the field. To create a new standard stereotype that is available in the drop-down at all times, you can add new standard stereotypes for a method.
Displaying Method Stereotype: The method stereotype is displayed on the class symbol before the method name. You may show or hide the stereotype of the method as follows:
1 Open the class diagram’s properties dialog: Right-click in the empty diagram workspace and then click Diagram Properties; or select Edit, Diagram from the menu.
2 Select or clear Suppress Method Stereotype.
Modifiers
Final
Give a method a constant value, that is, make this the ultimate version. If this is set, System Architect will generate a final modifier before the method in the Java code generated.
Synchronized
Allow only one path of execution at a time.
Native
Tell the Java compiler that the method's implementation is in an external C drive.
Static
Make a variable or method common for all objects of a class. If this is set, System Architect will generate a static modifier before the method in the Java code generated.
Abstract
Declare but not implement the method.
Concurrency
Concurrency describes a method's semantics in the presence of multiple threads of control.
Active
The class has its own thread of control.
Blocking
A passive object whose semantics are guaranteed in the presence of multiple threads of control.
Concurrent
An active object whose semantics are guaranteed in the presence of multiple threads of control.
Guarded
The semantics of the class are guaranteed in the presence of multiple threads of control. A guarded class requires collaboration among client threads to achieve mutual exclusion.
Multiple
The semantics of the class are guaranteed in the presence of multiple threads of control.
Sequential
The semantics of the class are guaranteed only in the presence of a single thread of control. Only one thread of control can be executing in the method at any one time.
Method Declaration (Access)
Visibility is a language-dependant property, and therefore is found on a specific language tab within the method definition (ie, Java, C++, etc). A method may be declared with the following visibilities:
+ public visibility
The method is accessible by all classes.
- private visibility
The method is accessible only to the class itself (in other words, operations of the class itself)
# protected visibility
The method is accessible to the class itself (operations of the class) and subclasses.
Additional visibilities may be defined for certain programming languages (ie, the implementation visibility for C++). The symbols prefixing the types of visibility above are known as “visibility” (see Visibility). This visibility adornment is displayed before the method on the class symbol.
See also
Methods and operations