A COBOL class (adapter class) is generated for a Java class or interface. This section explains how Java class and interface elements are mapped to COBOL class elements.
The Java language elements are mapped to the COBOL language elements as shown below:
Java | COBOL |
---|---|
Class | Class |
Interface | Class |
Constructor | Factory method |
Class variable (static field) | Factory property |
Class method (static method) | Factory method |
Instance variable (nonstatic field) | Object property |
Instance method (nonstatic field) | Object method |
Java basic data type | COBOL basic data type |
Only public elements are mapped to COBOL. Any class, interface, constructor, field, and method that are not public are not mapped to COBOL.