Creating Adapter Classes - Fujitsu J Adapter Class Generator User Manual

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

Advertisement

18
Chapter 3. Developing Programs

Creating Adapter Classes

This section explains how to generate an adapter class from a Java class.
Investigating the Java Class
First investigate the specifications of the Java class and interface to be used (class
name, package name, usage, and so on) to check whether the J adapter class
generator can handle the class and interface. See "
Generator Can Do
information on which classes and interfaces can be used.
Generating Adapter Class Source
If the target Java class and interface can be used, generate adapter class source.
Use the java2cob command to generate adapter classes. The java2cob command
reads the class file (extension .class) of the Java class/interface and generates the
corresponding adapter class source.
The java2cob command generates adapter classes of not only the class specified by
the option but also every other class/interface required to use the class.
An example of generating adapter class source from the java.util.Date class is shown
below.
Note: The class file referenced by the class/interface may not always be available,
depending on the execution environment. For information on how to generate
What the J Adapter Class Generator Cannot Do
" and "
Figure 3.1
What the J Adapter Class
" for

Advertisement

Table of Contents
loading

Table of Contents