Previous Topic Next topic Print topic


ISO2002MF 

Conformance between Interfaces

An interface interface-1 conforms to an interface interface-2 if and only if:

  1. For every method in interface-2 there is a method in interface-1 with the same name taking the same number of parameters, with consistent BY REFERENCE and BY VALUE specifications.
  2. If the formal parameter of a given method in interface-2 is an object reference, the corresponding parameter in interface-1 is an object reference following these rules:
    1. If the parameter in interface-2 is a universal object reference, the corresponding parameter in interface-1 is a universal object reference.
    2. If the parameter in interface-2 is described with an interface-name, the corresponding parameter in interface-1 is described with the same interface- name.
    3. If the parameter in interface-2 is described with a class-name, the corresponding parameter in interface-1 is described with the same class-name, and the presence or absence of the FACTORY and ONLY phrases is the same in both interfaces.
    4. If the parameter in interface-2 is described with the ACTIVE-CLASS phrase, the corresponding parameter in interface-1 is described with the ACTIVE-CLASS phrase, and the presence or absence of the FACTORY phrase is the same in both interfaces.
  3. If the formal parameter of a given method in interface-2 is not an object reference, the corresponding formal parameter in interface-1 has the same ANY LENGTH, PICTURE, USAGE, SIGN, SYNCHRONIZED, JUSTIFIED, and BLANK WHEN ZERO clauses, with the following exceptions:
    1. Currency symbols match if and only if the corresponding currency strings are the same.
    2. Period picture symbols match if and only if the DECIMAL-POINT IS COMMA clause is in effect for both or for neither of these interfaces. Comma picture symbols match if and only if the DECIMAL-POINT IS COMMA clause is in effect for both or for neither of these interfaces.
  4. The presence or absence of the Procedure Division RETURNING phrase is the same in the corresponding methods.
  5. If the returning item in a given method of interface-2 is an object reference, the corresponding returning item in interface-1 is an object reference following these rules:
    1. If the returning item in interface-2 is a universal object reference, the corresponding returning item in interface-1 is an object reference.
    2. If the returning item in interface-2 is described with an interface-name that identifies the interface int-r, the corresponding returning item in interface-1 is either of the following:
      1. an object reference described with an interface-name that identifies int-r or an interface described with an INHERITS clause that references int-r,
      2. an object reference described with a class-name, subject to the following rules:
        1. if described with the FACTORY phrase, the factory object of the specified class must be described with an IMPLEMENTS clause that references int-r
        2. if described without the FACTORY phrase, the instance objects of the specified class must be described with an IMPLEMENTS clause that references int-r.
    3. If the returning item in interface-2 is described with a class-name, the corresponding returning item in interface-1 is an object reference, subject to the following rules:
      1. If the returning item in interface-2 is described with the ONLY phrase, the returning item in interface-1 is described with the ONLY phrase and the same class-name.
      2. If the returning item in interface-2 is described without the ONLY phrase, the returning item in interface-1 is described with the same class-name or a subclass of that class-name.
      3. The presence or absence of the FACTORY phrase is the same.
    4. If the returning item in interface-2 is described with the ACTIVE-CLASS phrase, the corresponding returning item in interface-1 is described with the ACTIVE-CLASS phrase, and the presence or absence of the FACTORY phrase is the same.

    If the description of the returning item of a method in interface-1 directly or indirectly references interface-2, the description of the returning item of the corresponding method in interface-2 does not directly or indirectly reference interface-1.

  6. If the returning item in a given method of interface-2 is not an object reference, the corresponding returning item has the same ANY LENGTH,PICTURE, USAGE, SIGN, SYNCHRONIZED, JUSTIFIED, and BLANK WHEN ZERO clauses, with the following exceptions:
    1. Currency symbols match if and only if the corresponding currency strings are the same.
    2. Period picture symbols match if and only if the DECIMAL-POINT IS COMMA clause is in effect for both or for neither of these interfaces. Comma picture symbols match if and only if the DECIMAL-POINT IS COMMA clause is in effect for both or for neither of these interfaces.
  7. A group item is, for the purpose of conformance checking, considered to be equivalent to an elementary alphanumeric data item of the same length.
  8. The presence or absence of the OPTIONAL phrase is the same for corresponding parameters.
Previous Topic Next topic Print topic