Method and apparatus for creating dippable beans in a java environment
AssigneeInternational Business Machines Corporation
InventorKaralee Brown LeBlanc
Life of this patent
Estimating the term…
Abstract
The present invention provides a method and apparatus for creating objects in an object-oriented environment, such as Java. An interface is selected for and along with an implementation object. The interface and the implementation object are morphed to create a dippable object in a new class that includes the selected interface. The dippable object is able to accept new behaviors though dips. The dippable object calls an instance of the implementation object in response to calls made to the interface.
Claims23
A method in a data processing system for creating a dippable object, the method comprising:
- receiving an interface;
- receiving an identification of an object, wherein the object implements the interface;
- and
- creating a dippable object, wherein the dippable object is unrelated to the object, wherein the dippable object incorporates the interface, and wherein calls made to the dippable object through the interface are routed to an instance of the object.
A method for generating an object in a computer having an object oriented programming system, the method comprising the computer implemented steps of:
- identifying an first interface;
- identifying an object implementing the first interface;
- and
- creating a new object, wherein the new object includes the first interface and a second interface in which the second interface is employed by the new object to notify a second object of an occurrence of a selected condition and in which calls made to the first interface are sent to the object implementing the first interface.
A code generator in a computer readable medium having a plurality of modes of operation including:
- a first mode of operation, responsive to identifying an object in which the code generator creates a first type of dippable object using inheritance;
- and
- a second mode of operation, responsive to identifying an interface and an implementation object, in which the code generator creates a second type of dippable object using aggregation.
A data processing system for creating a dippable object, the data processing system comprising:
- first reception means for receiving an identification of an interface;
- second reception means for receiving an identification of an object, wherein the object implements the interface;
- and
- creating a dippable object, wherein the dippable object is unrelated to the object and wherein the dippable object incorporates the interface and wherein calls made to the dippable object through the interface are routed an instance of the object.
A data processing system for generating an object in an object oriented programming system located in the data processing system, the data processing system comprising:
- first identification means for identifying an first interface;
- second identification means for identifying an object implementing the first interface;
- and
- creation means for creating a new object, wherein the new object includes the first interface and a second interface in which the second interface is employed by the new object to notify a second object of an occurrence of a selected condition and in which calls made to the first interface are sent to the object implementing the first interface.
A computer program product for creating an object in an object oriented programming system, the computer program product comprising:
- a computer readable medium;
- first instructions for identifying an first interface;
- second instructions for identifying an object implementing the first interface;
- and
- third instructions for creating a new object, wherein the new object includes the first interface and a second interface in which the second interface is employed by the new object to notify a second object of an occurrence of a selected condition and in which calls made to the first interface are sent to the object implementing the first interface, wherein the instructions are embodied within the computer readable medium.
Dependencies are inferred from the claim text.