UML and SysML to Java - Operation Specification

This topic describes the operation specifications for Java code generation from UML and SysML models.

This page discusses:

Glossary

Acronym Definition
SPO Software Production Operation
BL Behavior Layer
ML Middleware Layer
BSM Behavior Specific Middleware
TSM Target Specific Middleware

Referenced Documents

Document Internal Reference
UML & SysML to Java - Class Code Generator Specification.docx [1]

General Concepts

UML to Java code generation operation is a code generation operation producing Java Code from UML entities. The operation is initiated from a Class or an Interface.

Input Elements

Not applicable

Validation Constraints

Validation Constraints are described in document [1].

Code Generator Specification

Software Production Operation Identity Card

Characteristics Values
Name UML to Java
Nature Component generation
Description This operation generates Java code from: - a UML Class - a UML Interface - a UML Enumeration
Scan description Scan lists: - UML Classes - UML Interfaces - UML Enumerations - UML Packages
Supported files Files with extensions: - .mdzip - .mdxml
Input objects UML Class UML Interface UML Enumeration UML Package
Return codes -1 : Generation is KO 0 : Generation is OK 1 : Input data are incorrect 2 : Model contains errors. Code generation cannot be executed.
Feature Generation - 50 credits per selected class

Parameters

"report_name" parameter

Attributes Values
Name report_name
Description Optional parameter specifying the name of the validation report. It is possible to use specific options for the name of the report as following: - %time% to be replaced by the UTC date in ISO-8601 format of the validation. Example: 2022-08-31T09:39:45.856814300Z - %input_file_name% to be replaced by the input file name without its extension.
Type String
Values [Default]
Multiplicity 0..1

"dry_run" parameter

Attributes Values
Name dry_run
Description Optional parameter describing if the generation is executed in dry mode to only obtain log and validation report without producing ESP assembly model. Note: This option does not consume any credits.
Type Boolean
Values [Default] Yes / [No]
Multiplicity 0..1

Files Specification

The code generator generates Java code compliant with Java Standard Edition.

If no output folder is specified, files are created by default under a root folder having the "Java" name.

packages are created as folders having the corresponding package name in the model.

Java folder hierarchy

Any character of the class, interface and enumeration name which is different of a digit, an ASCII letter, a - or a _, is replaced by an _ in the generated folder / file.

Car_stock.java: Example of java file name.

Any class, interface, or enumeration name that is a Java keyword is replaced with an '_' in the generated file name.

Example of java file name: String_.java