EP0629946A2

System and method for enabling before/after method processing in an object oriented system.

Abstract

A system for creating before and after behaviour upon invocation of a method in an object-oriented system. The framework provides metaclasses classes containing methods for dispatching a before method and an after method at the time of invocation of each client method in subclass instances. Object-oriented system properties of inheritance and encapsulation are supported as are derived metaclasses. Derivation ensures that the specification syntax for each class does not impact the expected result. The combination of explicit before after classes, dispatcher class, and derived metaclasses ensures that the system will have associative composition.

EP0629946A2, drawing sheet 1
Sheet 1 of 5

Term

Term ended

Projected expiry passed 13 June 2014, 12.3 years ago.

  1. Priority
  2. Filed
  3. Published
  4. Projected expiry
  5. Today

3 claims: 3 independent, 0 dependent

  1. 1
    A system for enabling construction of object-oriented classes implementing before and after behaviour for each dispatch of a method process, said system operating in a computer system having memory means and processing means (101) said system including at least one class means having data and methods for processing said data, the system comprising:means (220) for dispatching a BeforeMethod and an AfterMethod respectively before and after dispatching a method process, said means for dispatching being responsive to signalling of a class means;class means (224) for signalling method processing dispatch, said means being responsive to before and after behaviour requests, said class means being a subclass of one of said at least one class means and an instance of said means for dispatching;and    subclass means (230) for generating before and after behaviour requests to said class means, said subclass means being a subclass of said class means (224) and being responsive to an instance method invocation.
  2. 2
    A method for generating associative object metaclass compositions in a computer system having memory (104) and at least one central processing unit (101) and, the method comprising the steps of:specifying a plurality of classes (202,231,234) having data and methods for operating on said data;creating a modifiable metaclass for dispatching for execution before or after method invocations;testing said plurality of classes (202,231,234) and said modifiable metaclass to determine a set of methods required for consistency;and    creating a metaclass hierarchy (232,224,222) based on said testing.
  3. 3
    A system enabling special method processing before and after processing of a method defined for an object (236) in an object-oriented computer system, each object having one or more object classes (224) and each of said one or more object classes having one or more object metaclasses (232), the special method processing enabled in an object-oriented framework having unmodifiable and modifiable classes, the system comprising:storage means (104) for storing said objects, classes and metaclasses;dispatch means (220) for dispatching said methods and said special methods, said dispatch means being a modifiable metaclass in said object-oriented framework.