Supplement, Constructor, Explanation – FUJITSU J Adapter Class Generator User Manual

Page 54: Expansion format, Generation rules

Advertising
background image

54 Chapter 5. Adapter Class Reference

Note: Fujitsu NetCOBOL does not distinguish between uppercase and lowercase

letters of a class name. Therefore, class names whose external class names are

different only in uppercase and lowercase letters cannot be used concurrently.
Supplement
When the adapter class of java.lang.String is generated, the public method defined

in the java.lang.String class is generated. In addition, a method for referencing or

setting character string data is generated (see "

java-lang-String class

").

Constructor

Explanation
A public constructor is mapped to a COBOL factory method.
Expansion format

METHOD-ID internal-method-name AS "external-method-name".
...
DATA DIVISION.
LINKAGE SECTION.
01 generated-object OBJECT REFERENCE SELF.
[parameter ...]
PROCEDURE DIVISION [USING parameter ...] RETURNING generated-object
[RAISING exception-class-name].
END METHOD internal-method-name.

Generation rules
1. The internal method name is internally used by the J class method generator and

are not viewed from the class user.

2. The external method name is used to identify the method. The class user can

identify the method with the external method name.

3. An external method name is generated according to the following rules:

Create-JavaClassName-nn

-

"Create-" is followed by a Java class name with a hyphen "-" followed by a

two-digit number (nn).

-

The Java class name does not include the package name.

-

nn is a serial number assigned in order from 01 to 99 to methods having the

same Java class name.

-

If a super class has classes having the same Java class names, serial

numbers are assigned to such classes in order from the super class. (See

"

Numbering names

.")

-

A name exceeding 160 characters is truncated after the 160th character.

4. When a parameter is declared for the constructor, the corresponding parameter

is generated. See "

Data types

" for the correspondence between parameter data

types.

5. The generated object is the unique object reference name used to store the

object reference to the generated adapter object.

Advertising