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

Compiling class definition files

An ABL class definition represents a user-defined type (object type) that encompasses all classes and interfaces in its hierarchy. When you compile a class, the compiler does not only compile the .cls file identified to the compiler. Instead the compiler compiles all the .cls files that compose its hierarchy. For each class definition file that is in the class's hierarchy, the compiler generates in-memory r-code and if the compiler SAVE option is specified, generates an r-code file.
Thus, the files compiled by the compiler include:
*The requested class definition file
*Class definition files for the super classes in the class hierarchy
*Class definition files for any implemented interfaces for this class
*Class definition files for any implemented interfaces for classes in the class hierarchy
*Any include files that the class and interface files use
The compiler does not fully compile or generate an r-code file for other classes that are referenced within a class. The compiler instead inspects referenced class files to determine their external interfaces (their public data members, properties, methods, and events). This information is used to validate the use of these classes in the class being compiled.
Caution: When you compile a class, although ABL automatically compiles all super classes in its class hierarchy, it does not know about and cannot automatically compile any of the subclasses of the class you are compiling. Thus, when you change the API of a super class, you must compile the class and all subclasses of the class to ensure that all objects with this class in their hierarchy inherit the updated definition. ABL, by itself, has no knowledge of these subclasses, so you must keep track of them manually or by using configuration management tools.
* Protocol for class hierarchy and references
* Data type matching
* Using the COMPILER system handle