Setting up Java specific information for operations (Java code)
In addition to the standard Operation properties in Modeler, you can apply the «Java Method» stereotype to an Operation, and then use its Tag Definitions to define Java specific information.
1. If you have not done so already, add the Java Profile package to your Model.
How?
2. Set the standard properties of the Operation as required.
Tell me more...
3. Apply the «Java Method» stereotype to the Operation.
b. Create a sub Class of the Throwable class and set the Name the class to that of the exception.
c. For the Operation, set the tagged value of the Java Throws tag definition to reference the exception Class.
7. If you want to specify an exception through the Java Throws Text tag definition, set the tagged value of the Java Throws Text tag definition to the exception text.
8. If you want to specify a method modifier that is generated before the method's data type, specify the text as the tagged value of the Java Method Modifier tag definition.
If you set the Java Method Modifier tag definition to native, ACS does not generate any body code.
9. If you want to specify an array for the method, specify the required pairs of empty brackets as the tagged value of the Java Array Spec tag definition.
10. If the method is using a Java Generic for its data type and you want to specify the arguments that are passed to the generic type, set the tagged value of the Java Actual Arguments tag definition to the actual arguments.
11. If you want to generate the method's data type with a qualified name, set the tagged value of the Java Needs Qualified Type tag definition to TRUE.
12. If you want to generate an @Override annotation, set the tagged value of the Java Override tag definition to TRUE.
13. If you want to generate the Operation as a static block (static construction clause), set the Java Static Block tag definition to TRUE.
14. If you want to generate the Operation as an instance block, set the Java Instance Block tag definition to TRUE.
15. If you want to set up the method as a generic type, apply the «Java Generic» stereotype to the Operation, and then specify the formal type parameters through the Java Formal Type Parameters tag definition.