Mechanism for dynamic selection of an object's method
First Claim
1. A computer program product comprising:
- a computer usable medium having computer readable program code embodied therein for implementing an object oriented programming language, the computer readable program code comprising;
(a) computer readable program code in respect of at least two code blocks for at least one method of an object of a specified class, each of said code blocks containing a different implementation of said at least one method, and (b) computer readable program code for accessing a desired code block at run-time on a per object instance basis so as to allow selection of a desired implementation of said at least one method without requiring instantiation of an object of a different class;
said selection of which implementation to invoke being integrated into an existing invocation method of said language and thus being transparent to a calling application invoking said at least one method.
2 Assignments
0 Petitions
Accused Products
Abstract
A data structure and associated mechanism for implementing object oriented programming language, comprising at least two code blocks for at least one method of an object of a specified class, each of the code blocks containing a different implementation of the at least one method. An access mechanism is provided for accessing a desired code block at run-time on a per object instance basis so as to allow selection of a desired implementation of the at least one method without requiring instantiation of an object of a different class. The selection of which implementation to invoke is integrated into an existing invocation method of the language and is thus transparent to a calling application invoking the method.
-
Citations
27 Claims
-
1. A computer program product comprising:
-
a computer usable medium having computer readable program code embodied therein for implementing an object oriented programming language, the computer readable program code comprising;
(a) computer readable program code in respect of at least two code blocks for at least one method of an object of a specified class, each of said code blocks containing a different implementation of said at least one method, and (b) computer readable program code for accessing a desired code block at run-time on a per object instance basis so as to allow selection of a desired implementation of said at least one method without requiring instantiation of an object of a different class;
said selection of which implementation to invoke being integrated into an existing invocation method of said language and thus being transparent to a calling application invoking said at least one method. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 26)
-
-
14. A program storage device readable by a machine, tangibly embodying a program of instructions executable by the machine to perform method steps for implementing an object oriented programming language, said method steps comprising:
-
(a) providing at least two code blocks for at least one method of an object of a specified class, each of said code blocks containing a different implementation of said at least one method, and (b) accessing a desired code block at run-time on a per object instance basis so as to allow selection of a desired implementation of said at least one method without requiring instantiation of an object of a different class;
said selection of which implementation to invoke being integrated into an existing invocation method of said language and thus being transparent to a calling application invoking said at least one method. - View Dependent Claims (15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27)
a first one of said code blocks relates to an implementation of the method for a master object and second one of said code blocks relates to an implementation of the method for a proxy object, and step (b) is performed by a run-time system supporting a distributed program running on a cluster of machines to change the implementation of an object from master to proxy or vice versa during run-time in a manner which is transparent to an application invoking said method.
-
-
21. The device of claim 14, being used by a caching program for implementing different cache strategies according to an instance of the object.
-
22. The device of claim 14, wherein step (b) includes defining a parameter indicative of a pragmatic behavior, so as to allow different pragmatic behaviors to be associated with said method for each object that is an instance of the specified class.
-
23. The device of claim 14, wherein step (b) includes accessing an optimization program for implementing different optimization strategies according to an instance of the object.
-
24. The device of claim 14, wherein step (b) includes using pointers to point to a desired one of the code blocks.
-
25. The device of claim 14, wherein step (b) includes using an index for accessing a desired one of the code blocks.
-
27. The program storage device according to claim 14, wherein said at least two code blocks containing different implementations of said at least one method co-exist at run-time.
Specification