Fujitsu J Adapter Class Generator Portable Generator User Manual


 
Chapter 5. Adapter Class Reference 65
GET-STRING-LENGTH-N method (object method)
Explanation
This method returns the length of the character string of the String object as the
length (number of characters) of the national data item.
Syntax
INVOKE
anObject
"GET-STRING-LENGTH-N" RETURNING
stringLength
Parameter and return value
anObject
Specifies the String object whose character length is to be checked.
stringLength (attribute: PIC S9(9) COMP-5)
Returns character string length.
Array Adapter Class
A Java array is handled as an object in COBOL. Therefore, an adapter class is
generated for each array attribute (element type and number of dimensions). This
section explains how Java arrays are mapped to COBOL classes.
Array class
Explanation
An adapter class corresponding to the array is generated when:
An array is used as a parameter of a public constructor.
The type of a public field (static or non-static) is an array.
An array is used as a parameter or return value of a public method (static or
non-static).
Arrays whose attributes shown below match are associated with the same adapter
class:
Array element type
Number of dimensions