Rational Developer for System z
COBOL for Windows, Version 7.5, Language Reference


Identifying and referencing the class

An external-class-name is used to identify and reference a given class from outside the class definition that defines the class. The external class-name is determined by using the contents of external-class-name-1, external-class-name-2, or class-name-1 (as specified in the repository paragraph of a class), as described below:

  1. external-class-name-1 and external-class-name-2 are used directly, without translation. They are processed in a case-sensitive manner.
  2. class-name-1 is used if external-class-name-1 or java-array-class-reference is not specified. To create an external name that identifies the class and conforms to Java rules of formation, class-name-1 is processed as follows:

The class can be implemented in Java or COBOL.

When referencing a class that is part of a Java package, external-class-name-1 must be specified and must give the fully qualified Java class-name.

For example, the repository entry

Repository.
    Class JavaException is “java.lang.Exception”

defines local class-name JavaException for referring to the fully qualified external-class-name “java.lang.Exception.”

When defining a COBOL class that is to be part of a Java package, specify an entry in the repository paragraph of that class itself, giving the full Java package-qualified name as the external class-name.


Terms of use | Feedback

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)