Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Naming conventions

This section describes how the names in the Java classes are constructed for the different code conventions.

When cobol is used as code convention, the following mapping rules apply:

  • The COBOL name is retained as far as possible.

  • Hyphens are replaced by underscores.

  • All arrays are indexed with 0.

If java is used as code convention then the following mapping rules apply:

  • All uppercase are converted to lowercase.

  • Letters following a hyphen are written in uppercase. All hyphens are removed.

  • The first letter of a class name is written in uppercase.

  • The names of get methods are formed from get plus the attribute name and the first letter of the attribute name is written in uppercase.

  • The names of set methods are formed from set plus the attribute name and the first letter of the attribute name is written in uppercase.

  • All arrays are indexed with 0.


Example 29 Name assignment for the different code conventions

Depending on the code convention, the following names are formed for the COBOL field named EMPLOYEE-RECORD:

Code convention

Java attribute name

Java get/set method name

cobol

EMPLOYEE_RECORD

getEMPLOYEE_RECORD ()
setEMPLOYEE_RECORD ()

java

employeeRecord

getEmployeeRecord()
setEmployeeRecord()

If the data structure contains substructures with the name FILLER or if the program contains multiple substructures with the same name then these structures are numbered in order in accordance with their sequence in the xml input file. When the Java classes are generated, this number n is appended to the generated names in the form _R_n.

If the data structure contains fields with the name FILLER then these fields are numbered in order in accordance with their sequence in the xml input file. When the Java classes are generated, this number n is appended to the generated names in the form _n.