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

Page 57: Expansion format, Generation rules

Advertising
background image

Chapter 5. Adapter Class Reference 57

2. "out" is mapped to J-PRINTSTREAM (internal class name of java-io-PrintStream)

because its attribute is java.io.PrintStream.

Supplement
When a property name is generated from a field name, a number is assigned to

secure the uniqueness of the name. The class browser can be used to check the

correspondence between fields and properties.

Class method

Explanation
A public class method (static method) is mapped to a COBOL factory method.
Expansion format

METHOD-ID. internal-method-name AS "external-method-name" [OVERRIDE].
...
DATA DIVISION.
LINKAGE SECTION.
[parameter ...]
[return-value ...]
PROCEDURE DIVISION [USING parameter ...] [RETURNING return-value]
[RAISING exception-class-name].
END METHOD internal-method-name.

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

and cannot be viewed from the class user.

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

identifies the method with the external method name.

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

JavaMethodName[-nn]

-

A Java method name is used as is as a COBOL method name.

-

If a same method name has already been assigned, the second and

subsequent method 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 160 characters is truncated after the 160th character.

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

generated. See "

Data types

" for the correspondence between parameter data

types.

5. When a return value is declared for the method, the corresponding return value

is generated. See "

Data types

" for the correspondence between return value

data types.

6. When an exception is declared for the constructor, the RAISING specification is

generated.

Advertising