composition of before/after metaclasses in som
In SOM, the IBM System Object Model, a class is a run-time object that defines the behavior of its instances by creating an instance method table. Because classes are objects, their behavior is defined by other classes (called metaclasses). For example, a Before/After Metaclass can be used to define the implementation of classes that, by suitable construction of their instance method tables, arrange for each invocation of a method to be preceded by execution of a before method and followed by execution of an after method. This paper introduces and solves the problem of composing different Before/After Metaclasses in the context of SOM. An enabling element in the solution is SOM's concept of derived metaclasses , i.e., at run-time a SOM system derives the appropriate metaclass of a class based on the classes of its parents and an optional metaclass constraint.
compositing class systems object model object behavior method tables examples implementation paper context concept constraint timing