56 Chapter 5. Adapter Class Reference
Class variable
Explanation
A public class variable (static field) is mapped to a COBOL property method (factory).
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.
-
If the property name has already been assigned, the second and subsequent
property names are each suffixed with a hyphen "-" followed by a two-digit
number (01 to 99) to prevent name duplication. (See "
Numbering names.")
-
A name exceeding 30 characters is truncated after the 30th character.
3.
When FINAL is specified, no property method with the SET specification is
generated.
4.
The property value is a parameter used to transfer a property value. The data
description entry expands the COBOL description entry corresponding to the Java
field attribute. See "
Data types" for the correspondence of data types.
Generation rules
The property method corresponding to the class variable out (static final field) of the
java.lang.System class is generated as shown below:
METHOD-ID. GET PROPERTY JF-OUT. [1]
...
LINKAGE SECTION.
01 GET-VALUE OBJECT REFERENCE J-PRINTSTREAM. [2]
PROCEDURE DIVISION RETURNING GET-VALUE.
...
END METHOD JF-OUT.
1.
The property name is generated by adding "OUT", which is the uppercase of the
Java field name, to "JF-".
Содержание J Adapter Class Generator
Страница 1: ...J Adapter Class Generator User s Guide ...
Страница 6: ...6 NetCOBOL J Adapter Class Generator User s Guide ...
Страница 16: ...16 Chapter 2 Adapter Class Generator Framework ...
Страница 17: ...Chapter 3 Developing Programs This chapter explains how to develop programs that use Java classes ...
Страница 80: ...80 Chapter 6 Messages ...