Release 10.1A: OpenEdge Getting Started:
Object-oriented Programming

> ## Using the COMPILER system handle

> The `COMPILER` system handle provides the following attributes, specifically for compiling class files:

> - `MULTI-COMPILE` attribute

> - `CLASS-TYPE` attribute

> ##### MULTI-COMPILE attribute

> The `MULTI-COMPILE` attribute on the `COMPILER` system handle is a read-write attribute that improves the performance of the compiler in certain situations. Normally, the compiler compiles all class files in a class hierarchy. The compiler does not try to determine if the files in the class hierarchy have changed since the last compilation.

> To improve performance, you can set the `MULTI-COMPILE` attribute to `TRUE`. This causes the compiler to only compile those class files within a class hierarchy that it has not already compiled since `MULTI-COMPILE` was set to `TRUE`. Your build application can set this attribute to `TRUE` when you are building all class files within an application, and no files are going to be modified during the process. While this attribute is `TRUE`, the Progress session caches class and interface compilations such that when a class or interface is thereafter compiled, Progress will not recompile any classes or interfaces that are in the cache. Progress flushes this cache when `MULTI-COMPILE` is set to `FALSE`.

> The following example demonstrates the use of the `MULTI-COMPILE` attribute:

>     COMPILER:MULTI-COMPILE = TRUE.
>     COMPILE "C:\acme\myObjs\CustObj.cls".
>     COMPILE "C:\acme\myObjs\NECustomer.cls".
>     COMPILER:MULTI-COMPILE = FALSE.

> In this example, any class files that have been compiled during the compilation of `acme.myObjs.CustObj.cls` and also participate in the class hierarchy of `acme.myObjs.NECustomer.cls`, are not compiled again during the compilation of `acme.myObjs.NECustomer.cls`.

> Caution: Leaving this attribute set to `TRUE` causes the Progress session to ignore any changes to classes that have already been compiled during the session while the attribute was set.

> ##### CLASS-TYPE attribute

> The `CLASS-TYPE` attribute on the `COMPILER` system handle is a read-only attribute that identifies the class type name of the class file that was compiled by the most recently executed `COMPILE` statement. For example, after the application compiles a class file `CustObj.cls` that contains the `CLASS` statement, `CLASS` `acme.myObjs.CustObj`, the `COMPILER:CLASS-TYPE` attribute contains the string, `"acme.myObjs.CustObj"`. If the last file compiled with the `COMPILE` statement is not a class file, this attribute is set to the empty string (`""`).

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095