Visibility of operations

Operations can be public or private. Private operations are used by an object for its own internal affairs and are not part of the interface of the object. Public operations are services that the object exposes for consumption by other objects. These operations comprise the contract of the object and remain stable throughout the lifecycle of the system to avoid ripple effects throughout the system. Changes to private operations (and attributes) do not impact the rest of the system.

Declarations and definitions for public and private operations can be generated in either the specification or implementation file for an object, depending on the visibility of the operation.

Note: Events and triggered operations are always public.

Operation names have different default formats, depending on whether the operation is public or private:

You can change the default format of operation names using the following properties:


Feedback