Fujitsu J Adapter Class Generator Portable Generator User Manual


 
Chapter 5. Adapter Class Reference 51
GET-EXCEPTION method (object method)
Explanation
The Java exception information is returned.
Syntax
INVOKE EXCEPTION-OBJECT "GET-EXCEPTION" USING
message
messageLength
class
classLength
RETURNING
result
Parameter and return value
message (attribute: PIC X ANY LENGTH)
Specifies the data item that stores the Java exception message.
messageLength (attribute: PIC S9(9) COMP-5)
Length (number of bytes) of Java exception message is returned.
class (attribute: PIC X ANY LENGTH)
Specifies the data item that stores the Java exception class.
classLength (attribute: PIC S9(9) COMP-5)
Length (number of bytes) of Java exception message is returned.
result (attribute: PIC S9(9) COMP-5)
"0" is returned when Java exception information exists. "-1" is returned when
Java exception information does not exist.
Notes: The Java exception information can be acquired only when the exception
type is "1".
Class or Interface Adapter Class
A COBOL class (adapter class) is generated for a Java class or interface. This section
explains how Java class and interface elements are mapped to COBOL class
elements.
The Java language elements are mapped to the COBOL language elements as shown
below:
Java COBOL
Class Class
Interface Class
Constructor Factory method
Class variable (static field) Factory property
Class method (static method) Factory method
Instance variable (nonstatic field) Object property
Instance method (nonstatic field) Object method
Java basic data type COBOL basic data type
Only public elements are mapped to COBOL. Any class, interface, constructor, field,
and method that are not public are not mapped to COBOL.