Fujitsu J Adapter Class Generator User Manual page 58

Fujitsu user's guide j adapter class generator
Table of Contents

Advertisement

58
Chapter 5. Adapter Class Reference
Generation example
The factory method corresponding to class method abs (long) of the java.lang.Math
class is generated as shown below:
METHOD-ID. JM-ABS-01 AS "abs-01".
...
LINKAGE SECTION.
01
RTN-VALUE
01
PARA-1
PROCEDURE DIVISION USING PARA-1 RETURNING RTN-VALUE.
...
END METHOD JM-ABS-01.
1. Since more than one "abs" method is declared, a method with name "abs-01" is
generated for abs (long) that is declared second.
Supplement
When a COBOL method name is generated from a Java method name, a number is
assigned to secure the uniqueness of the name. The class browser or method name
cross-reference list file can be used to check the correspondence between Java
methods and COBOL methods. In the case of class browser, it can be identified
from the parameter that appears during method selection. In the case of method
name cross-reference list file, it can be identified from the type of argument of the
constructor.
Instance variable
Explanation
A public instance variable (non-static field) is mapped to a COBOL property method
(object).
Expansion format
METHOD-ID. GET PROPERTY property-name.
...
LINKAGE SECTION.
01 property-value data-description-entry.
PROCEDURE DIVISION RETURNING property-value.
...
END METHOD property-name.
METHOD-ID. SET PROPERTY property-name.
...
LINKAGE SECTION.
01 property-value data-description-entry
PROCEDURE DIVISION USING property-value.
...
END METHOD property-name.
Generation rules
1. The property name is used to identify the property. The class user can identify
the property with the property name.
2. A property name is generated according to the following rules:
JF-JavaFieldName[-nn]
"JF-" is followed by a Java field name in uppercase.
-
PIC S9(18) COMP-5.
PIC S9(18) COMP-5.
[1]

Advertisement

Table of Contents
loading

Table of Contents