Fujitsu J Adapter Class Generator User Manual page 70

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

Advertisement

70
Chapter 5. Adapter Class Reference
Name that is always unique according to generation rules
A class name is generated from a class name or interface name qualified by a Java
package name. Since the qualified name is unique, the COBOL name generated
from it is always unique. The same applies to an array class name.
Thus, no class names and array class names are numbered.
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:
Super classes have a same name qualified by different packages.
Two or more constructors are defined for one class.
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
java.util.Date class
java.sql.Date class
Name that needs to be unique within an entire run unit
Java method names are normally used as they are in COBOL. However, Java
permits multiple methods with a same name to be defined if they have different
parameters. In this case, numbers are assigned to COBOL method names for
identification. However, to take advantage of polymorphism (diversification) that is
the characteristics of object-oriented programming, methods having the same name
and parameter are always assigned the same name. This correspondence
relationship must be consistent within the run unit of the COBOL program that uses
Date()
Date(int, int, int)
Date(int, int, int, int, int)
Date(int, int, int, int, int,
int)
Date(long)
Date(String)
Date(int, int, int)
Date(long)
COBOL factory method
ava-util-Date class
Create-Date-01
Create-Date-02
Create-Date-03
Create-Date-04
Create-Date-05
Create-Date-06
java-sql-Date class
Create-Date-07
Create-Date-08

Advertisement

Table of Contents
loading

Table of Contents