Initial Code




See also


On the Behavior tab of the Operations dialog, you can use the Initial Code field to enter code to be inserted into an operation body when the operation is first generated to file. After this point, forward code generation and synchronization do not replace the existing operation code with the Initial Code field.

By default, the Initial Code field also is not imported into the model during reverse engineering, but you can select to import the field by selecting the Include method bodies in model when reverse engineering checkbox on the Options dialog.

This field is most useful when combined with UML Patterns. Elements within a pattern often require the same stub code. Notice that the language specific patterns available from include initial code for some of the defined operations. This helps speed up the process of applying patterns from model to implementation. The Initial Code section is also useful for ensuring that the generated code is directly compilable.

Options- Attributes/Operations

UML Patterns