standard.operation Java Operation

Warning the following fields appear only for operations belonging to java elements.
09 operation

Keys:

1 A real-time preview of the generated code.
2 The UML name field is used to modify the UML name of the Operation, i.e. the name that appears in the model browser.
3 The Alias tick-box is used to indicate that the Operation will use an alias for the generated file. This can be useful if the UML name of the Operation is not compatible with the java naming rules. When checked, a new field used to enter the alias name appears on the right.
4 The operation type selection:
  • The method button indicates the Operation is a simple Method.
    Shows an operationoperation icon in the model browser.

  • The constructor button indicates the Operation is called to build objects.
    Shows a constructorconstructor icon in the model browser.

  • The finalize button indicates the Operation is called when garbage collection determines that there are no more references to an object.
    Shows a destructordestructor icon in the model browser.

5 The Visibility buttons are used to indicate the visibility of the Operation.
6 The Modifiers tick-boxes are used to indicate which modifiers will be generated in the operation’s signature.
7 The Parameters zone allows a quick access to the operation’s parameters:
  • Add a parameter to the operation.

  • Add a return parameter to the operation.

  • The Delete button is used to remove the selected parameters.

  • The Move up button is used to move the selected parameters upwards.

  • The Move down button is used to move the selected parameters downwards.

  • The Advanced edition button is used to fine tune the selected parameter. See the corresponding view.

  • The UML name column is used to name parameters. Not applicable for return parameters.

  • The Value type column is used to select the parameter’s type.[1]

  • The Cardinalities column is used to set the parameter’s cardinalities, min and max.

8 The Javadoc field is used to enter a javadoc content for the Operation.
9 The Annotations field is used to add metadata for the operation. Example: @Override, @Deprecated.
10 The No code field is used to indicate that the Operation will not be generated.

1. This is an assisted field, you can either enter the type’s name and press Ctrl+space for auto-completion or click on the field and then click on the wanted element in the model.