Final
Usage
To specify that a class is final, use the following syntax:
Class MyApp.Exam As %Persistent [ Final ] { //class members }
Otherwise, omit this keyword or place the word Not immediately before the keyword.
Details
If a class is final, it cannot have subclasses.
Also, if a class is final, the class compiler may take advantage of certain code generation optimizations (related to the fact that instances of a final class cannot be used polymorphically).
Default
If you omit this keyword, the class definition is not final.
See Also
-
“Class Definitions” in this book
-
“Defining and Compiling Classes” in Using Caché Objects
-
“Introduction to Compiler Keywords” in Using Caché Objects