System and method for allowing registerable runtime modification of object behaviors
First Claim
1. A computer system allowing runtime modification of a called behavior, comprising:
- a computing platform communicatively coupled to a computer readable medium;
the computer readable medium storing an application;
the application including at least one override mechanism operable to provide behavior resolution in response to a call for a behavior; and
the override mechanism operable to provide the behavior resolution by calling at least one of a before method and an after method registered with the override mechanism as override methods.
14 Assignments
0 Petitions
Accused Products
Abstract
A system and method for allowing registerable runtime modification of object behaviors are disclosed. The disclosed embodiments provide an easily implemented and flexible approach for handling correct behavior resolution in an object-oriented program. A system incorporating teachings of the present disclosure may include an object-oriented program having an override mechanism capable of providing behavior resolution in response to a call for a registered method. In some embodiments, a computer readable medium may be storing the program and a computing platform may be communicatively coupled to the computer readable medium. In operation, an application operable to execute on the computing platform may call the registered method and the override mechanism may cause the execution of an appropriate behavior in response to the call.
38 Citations
19 Claims
-
1. A computer system allowing runtime modification of a called behavior, comprising:
-
a computing platform communicatively coupled to a computer readable medium;
the computer readable medium storing an application;
the application including at least one override mechanism operable to provide behavior resolution in response to a call for a behavior; and
the override mechanism operable to provide the behavior resolution by calling at least one of a before method and an after method registered with the override mechanism as override methods. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
a monitor communicatively coupled to the computing platform; and
a keyboard communicatively coupled to the computing platform.
-
-
3. The computer system of claim 1, further comprising an executable operable to generate the call for the behavior.
-
4. The computer system of claim 3, wherein the application comprises the executable.
-
5. The computer system of claim 1, wherein the application comprises an object-oriented program.
-
6. The computer system of claim 5, further comprising a registration interface associated with the override mechanism for registering an overrideable method with the override mechanism.
-
7. The computer system of claim 6, further comprising:
-
a second registration interface associated with the override mechanism, the second registration interface operable to allow registration of override implementations with the override mechanism; and
wherein one or more of the override implementations includes before methods and after methods.
-
-
8. The computer system of claim 7, wherein the override mechanism is operable to restrict non-registerable override implementations from registration through the second registration interface.
-
9. The computer system of claim 7, wherein the second registration interface is operable to accept registration of override implementations from parent classes and subclasses.
-
10. A system for allowing runtime modification of object behavior in an object-oriented program operating on a computer system, comprising:
-
an object requiring flexibility at runtime, the object containing at least one method registered with an override mechanism;
the at least one method stubbed to call the override mechanism for behavior resolution if called; and
the override mechanism operable to ensure execution of an appropriate behavior in response to a call for the at least one registered method by calling at least one of a before method and an after method registered with the override mechanism as override methods for the at least one registered method. - View Dependent Claims (11, 12)
-
-
13. A method for allowing registerable runtime modification of object behaviors in an object-oriented program for a computer system, comprising:
-
providing an override mechanism within the object-oriented program;
registering at least one overrideable method associated with an object with the override mechanism;
setting the at least one overrideable method to call the override mechanism for behavior resolution if the at least one overrideable method receives a call;
registering an override implementation for the at least one overrideable method with the override mechanism, wherein the override implementation includes at least one of a before method and an after method; and
the override mechanism providing the behavior resolution by calling at least one of the before method and the after method from the override implementation. - View Dependent Claims (14, 15, 16)
-
-
17. A method for allowing registerable runtime modification of object behaviors in a computer system, comprising:
-
constructing an object operable to respond to a call with a first behavior if a first situation exists at runtime and further operable to respond to the call with a second behavior if a second situation exists at runtime;
implementing an override mechanism to handle correct behavior resolution when the object receives the call;
accepting registration of an override implementation with the override mechanism, wherein the override implementation includes at least one of a before method and an after method; and
wherein the override mechanism provides the correct behavior resolution by automatically calling at least one of the before method and the after method from the override implementation when the object receives the call. - View Dependent Claims (18, 19)
registering at least one method of the object with the override mechanism; and
stubbing the at least one method to call the override mechanism for behavior resolution if the at least one method is called.
-
-
19. The method of claim 17, further comprising providing a registration interface on the override mechanism to allow registering of the at least one method with the override mechanism.
Specification