subschemaCopyFinal Option

The subschemaCopyFinal method option enables you to specify that a method cannot be reimplemented in a subschema copy class.

The Jade Method Definition and External Method Definition dialogs provide the Subschema Copy Final check box. As this check box is unchecked by default, methods can be extended or reimplemented in the local schema, subschemas, and in subschema copy classes unless you specify otherwise. For details, see "Defining and Compiling Jade Methods and Conditions", in Chapter 4.

You can change this method option (for an existing method) from the editor pane, by adding or removing the subschemaCopyFinal method option in the method signature and then recompiling that method.

As an example, consider the following situation.

Schema A
Class C1 - method m1 - subschemaCopyFinal
    Class C2
        Class C3 – method m2 calls m1

As the developer of schema A, you may want to guarantee that when method m2 of class C3 is called, it always uses the schema A implementation of C1::m1. However, you will allow class C3 to be subclassed and method m1 to be reimplemented on subclasses.

The following therefore applies.

Schema B – subschema of Schema A
Subschema Copy Class C1 (reimplementation of m1 not allowed on subschema
                         copy)
    Subschema Copy Class C2 (reimplementation of m1 not allowed because
                             subschemaCopyFinal)
        Subschema Copy Class C3 (reimplementation of m1 not allowed because
                                 subschemaCopyFinal)
            Class C4 - reimplemented m1 allowed