Fujitsu J Adapter Class Generator Bedienungsanleitung

Stöbern Sie online oder laden Sie Bedienungsanleitung nach Software Fujitsu J Adapter Class Generator herunter. Fujitsu J Adapter Class Generator User's Manual Benutzerhandbuch

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 98
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen

Inhaltsverzeichnis

Seite 1 - Generator User’s Guide

J Adapter Class Generator User’s Guide

Seite 2

10 Chapter 1. Outline of J Adapter Class Generator What is the J Adapter Class Generator? Taking advantage of the object-oriented function, Fujit

Seite 3 - Preface

Chapter 1. Outline of J Adapter Class Generator 11 The Java class interface must be converted into the COBOL interface for a COBOL program to use

Seite 4 - Product Names

12 Chapter 1. Outline of J Adapter Class Generator Therefore, the following restrictions apply to COBOL: - Listener Java registers a listener ob

Seite 5 - Registered Trademarks

Chapter 2. Adapter Class Generator Framework This chapter explains the framework of the J adapter class generator.

Seite 6

14 Chapter 2. Adapter Class Generator Framework Adapter Class To make Java classes available to COBOL, a mechanism for converting the Java class

Seite 7 - Contents

Chapter 2. Adapter Class Generator Framework 15 Adapter Object At execution time, an adapter class generates the adapter object corresponding to

Seite 8

16 Chapter 2. Adapter Class Generator Framework

Seite 9 - Generator

Chapter 3. Developing Programs This chapter explains how to develop programs that use Java classes.

Seite 10 - Figure 1.1

18 Chapter 3. Developing Programs Creating Adapter Classes This section explains how to generate an adapter class from a Java class. Investigati

Seite 11

Chapter 3. Developing Programs 19 adapter classes when the class file is not available, see "Generating an adapter class when the class fil

Seite 12 - Preparation

Seventh Edition: August 2005 The contents of this manual may be revised without prior notice. No part of this document may be reproduced or transmit

Seite 13 - Framework

20 Chapter 3. Developing Programs Therefore, an adapter class cannot be generated normally without these class files. These class files may not

Seite 14 - Adapter Class

Chapter 3. Developing Programs 21 Example: When an application uses only the println (Object) method of the java.io.PrintStream class, specify a

Seite 15 - Adapter Object

22 Chapter 3. Developing Programs ... REPOSITORY. CLASS J-OBJECT AS "java-lang-Object" ... LINKAGE SECTION. 01 P1-OUTPUTSTREAM

Seite 16

Chapter 3. Developing Programs 23 Terminating the Java VM When an adapter class is no longer used, the Java VM must be terminated. Use the JVM-

Seite 17

24 Chapter 3. Developing Programs An example of generating a Date class object is shown below: ... REPOSITORY. CLASS J-Date AS "java-

Seite 18 - Creating Adapter Classes

Chapter 3. Developing Programs 25 An example of referencing the class variable AM_PM_FIELD (static field) of the DateFormat class is shown below

Seite 19 - Building an Adapter Class

26 Chapter 3. Developing Programs An example of assigning an object, which has been referenced with Object class data, into Data class data is s

Seite 20 - Class information was not

Chapter 3. Developing Programs 27 … When the -s option or the "Option String" parameter is specified, the conversion between the Str

Seite 21 - Parameter

28 Chapter 3. Developing Programs If an adapter class is generated by specifying the -t option or the "Option Terminal" parameter, the

Seite 22 - Initializing the Java VM

Chapter 3. Developing Programs 29 DISPLAY "Error Code: " errCode. DISPLAY "Error Message: " errMessage(1:errMessageLe

Seite 23 - Generating an Object

Preface The "NetCOBOL J Adapter Class Generator" is a tool that generates a COBOL class (adapter class) used to call a Java class. Using th

Seite 24 - Manipulating a Variable

30 Chapter 3. Developing Programs Conversion to Java2 When using the resources (execute-form programs (EXE), DLLs, adapter class source, and pro

Seite 25 - Assignment to a Subclass

Chapter 4. Using the Generator Command This chapter explains how to use the generator command (java2cob), optional file and output result.

Seite 26

32 Chapter 4. Using the Generator Command Starting the J Adapter Class Generator Command Syntax When the constructor/method/field is not specifi

Seite 27

Chapter 4. Using the Generator Command 33 generated. When specifying two or more constructors, they must be delimited by comma (,) or a blank.

Seite 28 - Exception Processing

34 Chapter 4. Using the Generator Command -om Specified to reduce the number of adapter classes generated. When this parameter is specified, th

Seite 29 - Running a Program

Chapter 4. Using the Generator Command 35 name, replace the period "." of the internal class name with a dollar sign "$". M

Seite 30 - Conversion to Java2

36 Chapter 4. Using the Generator Command Optional File The optional file is a text format file used to define generator options in a file inste

Seite 31

Chapter 4. Using the Generator Command 37 Notes on describing the optional file: • Clauses enclosed by square brackets can be omitted. • Curly

Seite 32 - Options

38 Chapter 4. Using the Generator Command Option Code Specification format Option Code = { SJIS | UNICODE } Specification contents Specify a cod

Seite 33

Chapter 4. Using the Generator Command 39 Option MethodTable Specification format Option MethodTable { YES | NO } Specification contents Specify

Seite 34

Chapter 5. Adapter Class Reference Chapter 5 provides detailed information on the FJ-JAVA-BASE, FJ-JAVA-CONTROL and FJ-JAVA-ERROR classes provided by

Seite 35 - Environment Variable

40 Chapter 4. Using the Generator Command Option ReduceClass Specification format Option ReduceClass = { YES | NO } Specification contents Speci

Seite 36 - Optional File

Chapter 4. Using the Generator Command 41 Option Terminal Specification format Option Terminal = { YES | NO } Specification contents Specify whe

Seite 37 - Option ClassPath

42 Chapter 4. Using the Generator Command Output The generator outputs the following files: • Adapter class source file • Generation name mana

Seite 38 - Option GenOnlyUsed

Chapter 4. Using the Generator Command 43 Figure 4.1 Generation Name Management File The J adapter class generator uses a generation name manag

Seite 39 - Option OutPutPath

44 Chapter 4. Using the Generator Command A method name cross-reference list file is output in the following format: [Java] java-class-name [CO

Seite 40 - Option String

Chapter 5. Adapter Class Reference This chapter provides detailed information on the FJ-JAVA-BASE, FJ-JAVA-CONTROL and FJ-JAVA-ERROR classes provided

Seite 41 - Option Terminal

46 Chapter 5. Adapter Class Reference Class Configuration The figure below shows the hierarchical relationships among the FJ-JAVA-BASE, FJ-JAVA-C

Seite 42 - Adapter Class Source File

Chapter 5. Adapter Class Reference 47 FJ-JAVA-BASE class The FJ-JAVA-BASE class is the super class of every adapter class. The FJ-JAVA-BASE class

Seite 43 - Numbering names

48 Chapter 5. Adapter Class Reference J-EQUALS Method (object method) Explanation This method checks whether the Java objects indicated by two ad

Seite 44

Chapter 5. Adapter Class Reference 49 Environment variable name Function COBJNI_MAX_NSTACK Specifies the maximum size (bytes) of the stack used

Seite 45

Registered Trademarks The registered trademarks appearing in this manual are as follows: Microsoft, Windows, and Windows NT are registered trademarks

Seite 46 - Class Configuration

50 Chapter 5. Adapter Class Reference FJ-JAVA-ERROR class The adapter class generates the exception object when some error is detected during exe

Seite 47 - FJ-JAVA-BASE class

Chapter 5. Adapter Class Reference 51 GET-EXCEPTION method (object method) Explanation The Java exception information is returned. Syntax INVOKE

Seite 48 - FJ-JAVA-CONTROL class

52 Chapter 5. Adapter Class Reference Data types The Java data types are mapped to the COBOL data types as shown below: Java data type COBOL data

Seite 49

Chapter 5. Adapter Class Reference 53 Expansion format CLASS-ID. internal-class-name-1 AS "external-class-name" INHERITS internal-class

Seite 50 - FJ-JAVA-ERROR class

54 Chapter 5. Adapter Class Reference Note: Fujitsu NetCOBOL does not distinguish between uppercase and lowercase letters of a class name. Ther

Seite 51

Chapter 5. Adapter Class Reference 55 6. When an exception is declared for the constructor, the RAISING specification is generated. Generation e

Seite 52 - Class and interface

56 Chapter 5. Adapter Class Reference Class variable Explanation A public class variable (static field) is mapped to a COBOL property method (fac

Seite 53

Chapter 5. Adapter Class Reference 57 2. "out" is mapped to J-PRINTSTREAM (internal class name of java-io-PrintStream) because its att

Seite 54 - Constructor

58 Chapter 5. Adapter Class Reference Generation example The factory method corresponding to class method abs (long) of the java.lang.Math class

Seite 55

Chapter 5. Adapter Class Reference 59 - If a same property name has already been assigned, the second and subsequent property names are each suf

Seite 56 - Class variable

6 NetCOBOL J Adapter Class Generator User's Guide

Seite 57 - Class method

60 Chapter 5. Adapter Class Reference Instance Method Explanation A non-public instance method (non-static method) is mapped to a COBOL object me

Seite 58 - Instance variable

Chapter 5. Adapter Class Reference 61 Generation example The object method corresponding to instance method getTime() of the java.util.Date class

Seite 59

62 Chapter 5. Adapter Class Reference Parameter and return value • class-name Specifies the internal class name of the java-lang-String class de

Seite 60 - Instance Method

Chapter 5. Adapter Class Reference 63 • createdObject (attribute: OBJECT REFERENCE SELF) Returns the generated object. Supplement When a data n

Seite 61

64 Chapter 5. Adapter Class Reference GET-STRING-N method (object method) Explanation This method fetches the character string from the String ob

Seite 62

Chapter 5. Adapter Class Reference 65 GET-STRING-LENGTH-N method (object method) Explanation This method returns the length of the character stri

Seite 63

66 Chapter 5. Adapter Class Reference Expansion format CLASS-ID. internal-class-1 AS "external-class-name" INHERITS internal-class-name

Seite 64

Chapter 5. Adapter Class Reference 67 CLASS-ID. JA-1-STRING AS "JA-1-java-lang-String" INHERITS J-OBJECT. ... END CLASS JA-1-STRIN

Seite 65 - Array Adapter Class

68 Chapter 5. Adapter Class Reference ... REPOSITORY. CLASS JA-2-INT AS "JA-2-int" CLASS JA-1-INT AS "JA-1-int"

Seite 66

Chapter 5. Adapter Class Reference 69 SET-ARRAY-ELEMENT method (object method) Explanation This method sets an element of an array object. Syntax

Seite 67

NetCOBOL J Adapter Class Generator User's Guide 7 Contents Chapter 1. Outline of J Adapter Class Generator...

Seite 68

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 int

Seite 69 - Numbering Names

Chapter 5. Adapter Class Reference 71 the J adapter class generator. For instance, the java.io.ObjectInputStream class inherits the java.io.Obje

Seite 70

72 Chapter 5. Adapter Class Reference read() read read(byte[]) read-01 java.io.ObjectInput interface read(byte[], int, int) java-io-ObjectInput c

Seite 71 - Figure 5.2

Chapter 6. Messages This chapter explains the messages output by the J adapter class generator, including the operator responses to the messages.

Seite 72

74 Chapter 6. Messages Java2cob Command Messages This section explains the messages output by the java2cob command, including the operator respon

Seite 73 - Chapter 6. Messages

Chapter 6. Messages 75 Error: An invalid class name "xxx" was specified. Specify a Java class name or interface name qualified by a p

Seite 74 - Java2cob Command Messages

76 Chapter 6. Messages Warning: The method name of constructor "xxx" exceeded 160 characters. The characters after the first 160 char

Seite 75 - Chapter 6. Messages 75

Chapter 6. Messages 77 Messages Output during Execution This section explains the messages output during execution of programs using adapter clas

Seite 76 - 76 Chapter 6. Messages

78 Chapter 6. Messages The current thread could not be connected to Java VM. Check whether the program properly invokes the JVM-ATTACH method. Th

Seite 77 - Chapter 6. Messages 77

Chapter 6. Messages 79 No Java field is found. Check whether the Java class/interface was changed after execution of the J adapter class generat

Seite 78 - 78 Chapter 6. Messages

8 NetCOBOL J Adapter Class Generator User's Guide Messages Output during Execution ...

Seite 80 - 80 Chapter 6. Messages

Chapter 7. Samples Sample 1 – Using Classes Example 1: Example of using java.lang.System, java.io.PrintStream, and java.util.Date classes This secti

Seite 81 - Chapter 7. Samples

82 Chapter 7. Samples Generating adapter classes Generate adapter classes using the java2cob command. java2cob java. lang. Object [1] java2cob

Seite 82 - 82 Chapter 7. Samples

Chapter 7. Samples 83 Sample 2 – Specifying Method Example 2: Example of generating an adapter class by specifying constructor/method/field This

Seite 83 - Sample 2 – Specifying Method

84 Chapter 7. Samples Generating adapter classes Generate adapter classes using the java2cob command. java2cob -r java.lang.System -gf out \

Seite 84 - 84 Chapter 7. Samples

Appendix A. Message List This chapter explains the messages output by the J adapter class generator, including the operator responses to the messages

Seite 85 - Appendix A. Message List

86 Appendix A. Message List Java2cob Command Messages This section explains the messages output by the java2cob command, including the operator r

Seite 86

Appendix A. Message List 87 Messages Output during Generation This section explains the messages output during adapter class generation, includin

Seite 87 - Message type Level Meaning

88 Appendix A. Message List Error: The suffix number exceeded 99. Generation was interrupted. Retry while specifying –r option, -gc option, -gm

Seite 88

Appendix A. Message List 89 Warning: The property name of field "xxx" exceeded 30 characters. The characters after the first 30 chara

Seite 89

Chapter 1. Outline of J Adapter Class Generator This chapter explains the function and operating environment of the J adapter class generator.

Seite 90

90 Appendix A. Message List Messages Output during Execution This section explains the messages output during execution of programs using adapter

Seite 91

Appendix A. Message List 91 The adapter class generated by the J adapter class generator contains a Java class name in invalid format. Contact t

Seite 92

92 Appendix A. Message List No Java method is found. Check whether the Java class/interface was changed after execution of the J adapter class g

Seite 93

Appendix B. Exception Type List The exception types that can be acquired by the GET-CODE method of the FJ-JAVA-ERROR class are described in this chap

Seite 94

94 Appendix B. Exception Type List 5 Meaning No Java field is found. Check whether the Java class/interface was changed after execution of the J

Seite 95

Appendix B. Exception Type List 95 10 Meaning A required Java class/interface definition is not found. Check the environment variable (COBJNI_CL

Seite 96

96 Appendix B. Exception Type List 15 Meaning An internal logical error (inconsistency between the return value and object reference) occurred.

Seite 97

Index adapter class, 14, 34, 46, 51 adapter object, 15 alphanumeric item, 27, 28, 34, 40 array, 65 assign, 25 -c, 32, 54, 63 class file, 18, 20 class

Seite 98 - 98 Index

98 Index 98 -r, 20, 33, 34, 58 ReduceClass, 40 restrictions, 12 return value, 57 Runtime, 12 -s[n], 34 SET-ARRAY-ELEMENT, 69 source file, 19, 29

Kommentare zu diesen Handbüchern

Keine Kommentare