Try OpenEdge Now
skip to main content
Object-oriented Programming
Developing and Deploying Classes : Compiling class definition files : Protocol for class hierarchy and references
 

Protocol for class hierarchy and references

In the following figure, ClassC inherits from both ClassB and ClassA. ClassC also implements InterfaceI1, and ClassB implements InterfaceI2.
Figure 14. Compiling class definition files
During the compilation of ClassC, the compiler generates separate r-code files for ClassC, ClassB and ClassA, as well as for InterfaceI1 and InterfaceI2. Also, if InterfaceI1 or InterfaceI2 inherit additional interfaces, the compiler generates separate r-code files for these inherited interfaces. Because ClassRef1 is referenced by ClassC (dotted arrow), the compilation of ClassC causes the compiler to determine the public interface for ClassRef1, but does not cause the compiler to build r-code for ClassRef1 or ClassRefSuper. Also, the compiler does not check the public interfaces to ClassRef2 (not shown) that is referenced from ClassRefSuper.
If you modify a method signature as well as executable code in both ClassA and ClassRefSuper, and then compile ClassC, the compiler recompiles ClassC, ClassB and ClassA and retrieves the updated signature from ClassRefSuper, but does not recompile ClassRefSuper. In order to give the application access to the updated executable code (including the updated signature) in ClassRefSuper, you need to recompile ClassRef1 or ClassRefSuper before recompiling and running ClassC or any other code that instantiates ClassRef1.