Top
NetCOBOL V11.0 J Adapter Class GeneratorUser's Guide
FUJITSU Software

5.8.3 Name that needs to be unique between super classes/subclasses

A factory method name corresponding a constructor is generated from a class name that is not qualified by a package name. Factory method names including methods inherited from the super classes must all be unique to one another. However, names conflict when:

In this case, the J adapter class generator assigns numbers to the methods with a same name according to the following rules:

  1. Number 01 is assigned to the name that appears first and then serial numbers are assigned in ascending order to the subsequent names.

  2. The above rule is applied to names in order from the constructor defined in the super class. When two or more constructors are defined for one class, the rule is applied to them in order they are defined.

Example

The factory methods corresponding to the constructor of the java.util.Date class and java.sql.Date class (subclass of the java.util.Date class) are assigned names as shown below:

Java constructor

COBOL factory method

java.util.Date class

Date()

ava-util-Date class

Create-Date-01

Date(int, int, int)

Create-Date-02

Date(int, int, int, int, int)

Create-Date-03

Date(int, int, int, int, int, int)

Create-Date-04

Date(long)

Create-Date-05

Date(String)

Create-Date-06

java.sql.Date class

Date(int, int, int)

java-sql-Date class

Create-Date-07

Date(long)

Create-Date-08