IP Library Granted Patent US 8,539,468
Granted Patent B2
US 8,539,468 · App. 12/032,965 · Granted Sep 17, 2013

System and methods for replacing software application classes using transparent object adapters

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,539,468
App. No.
12/032,965
Granted
Sep 17, 2013
Kind
B2
Abstract

A computer-implemented method for creating transparent object adapters for replaced classes in an multi-subsystem application is provided. The method includes determining whether an original class of the original subsystem is referenced by at least one other of the multiple subsystems in response to substituting a new subsystem for an original one. If the original class is referenced by at least one other of the multiple subsystems, a pair of corresponding classes for the original class is generated. One of the generated classes defines an object adapter class having the same name and package as the original class, the other class defining a new class. The method further includes configuring the object adapter class to export methods referenced by at least one of the other subsystems and to transform data and/or handle references to adapter objects passed as parameters or returned values. Additionally, the method includes configuring the object adapter class and the new class to maintain references to one another.

Claims (32)

1. A computer-implemented method for creating transparent object adapters for replaced classes in an application comprising multiple subsystems, the method comprising:

in response to substituting a new subsystem for an original subsystem from the multiple subsystems, determining whether an original class of the original subsystem is referenced by at least one other of the multiple subsystems;

if the original class is referenced by at least one of the other multiple subsystems, generating an object adapter class and a new class based on the original class, the object adapter class comprising a class having a same name and package as the original class, the new class comprising a public method that references the object adapter class, and the public method configured to determine whether the object adapter class is initialized and, if the adapter is not initialized, to create an instance of the original class, initialize the instance of the original class with a reference to the new class, and assign to the instance of the original class a reference attribute of the new class; and

invoking the public method when the object adapter class needs to be referenced;

wherein the object adapter class is configured to export methods referenced by at least one other of the multiple subsystems and to perform at least one among transforming data and handling references to adapter objects passed as parameters or returned values, and wherein the object adapter class and the new class are configured to maintain references to one another.

2. The method of claim 1 , further comprising configuring the new class without adapter logic.

3. The method of claim 1 , further comprising disposing of instances of the object adapter class and the new class when there are no external references to either class by at least one of the other subsystems.

4. The method of claim 3 , wherein the disposing is performed by an application-implemented garbage collector.

5. The method of claim 1 , further comprising configuring the new class to have a private reference attribute to an instance of the original class.

6. The method of claim 5 , further comprising initializing the private reference attribute with a null such that an adapter object is not instantiated until required by one of the other subsystems.

7. The method of claim 1 , wherein the original class has a private attribute that points to an instance of the new class, wherein the private attribute is initialized from each constructor of the original class with a weak reference to the instance of the new class.

8. A computer-based system for creating transparent object adapters for replaced classes in an application program comprising computer-readable code defining multiple subsystems, the system comprising:

at least one processor for executing computer-readable code; and

an object adapter generating module that is configured to execute on the at least one processor, the object adapter being further configured to:

determine whether the original class of an original subsystem of the application system is referenced by at least one other of the multiple application subsystems in response to the original subsystem being replaced by a new subsystem;

generate an object adapter class and a new class based on the original class if the original class is referenced by at least one other of the multiple subsystems, the object adapter class comprising a class having a same name and package as the original class, the new class comprising a public method that references the object adapter class, and the public method configured to determine whether the object adapter class is initialized and, if the adapter is not initialized, to create an instance of the original class, initialize the instance of the original class with a reference to a new class instance, and assign to the instance of the original class a reference attribute of the new class;

invoke the public method when the object adapter class needs to be referenced;

configure the object adapter class to export all methods referenced by at least one other of the multiple subsystems and to perform, according to predetermined adapter logic, at least one among transforming data and handling references to adapter objects passed as parameters or returned values; and

configure the object adapter class and the new class to maintain references to one another.

9. The system of claim 8 , wherein the new class is configured without adapter logic.

10. The system of claim 8 , wherein the object adapter generating module configures the new class to have a private reference attribute to an instance of the original class and initializes the private reference attribute with a null such that an adapter object is not instantiated until required by one of the other subsystems.

11. The system of claim 8 , wherein the original class comprises a private attribute that points to an instance of the new class, and wherein the private attribute is initialized from each constructor of the original class with a weak reference to the instance of the new class.

12. A non-transitory computer-readable storage medium in which is embedded computer-readable code that when loaded to and executed by a computer creates transparent object adapters for replaced classes in an application program comprising multiple subsystems by:

determining whether an original class of an original subsystem from the multiple subsystems is referenced by at least one other of the multiple subsystems in response to a new subsystem replacing the original subsystem;

if the original class is referenced by at least one of the other multiple subsystems, generating an object adapter class and a new class based on the original class, the object adapter class comprising a class having a same name and package as the original class, the new class comprising a public method that references the object adapter class, and the public method configured to determine whether the object adapter class is initialized and, if the adapter is not initialized, to create an instance of the original class, initialize the instance of the original class with a reference to a new class instance, and assign to the instance of the original class a reference attribute of the new class; and

invoking the public method when the object adapter class needs to be referenced;

wherein the object adapter class is configured to export methods referenced by at least one other of the multiple subsystems and to perform at least one among transforming data and handling references to adapter objects passed as parameters or returned values; and

wherein the object adapter class and the new class are configured to maintain references to one another.

13. The non-transitory computer-readable storage medium of claim 12 , wherein the new class is configured without adapter logic.

14. The non-transitory computer-readable storage medium of claim 12 , wherein the computer-readable code causes the computer to generate the new class so as to have a private reference attribute to an instance of the original class and initialize the private reference attribute with a null such that an adapter object is not instantiated until required by one of the other subsystems.

15. The non-transitory computer-readable storage medium of claim 12 , wherein the original class comprises a private attribute that points to an instance of the new class.

16. The non-transitory computer-readable storage medium of claim 15 , wherein the private attribute is initialized from each constructor of the original class with a weak reference to the instance of the new class.

Assignments (3)
CONVEYOR IS ASSIGNING ALL INTEREST Recorded Jan 10, 2018
From: INTERNATIONAL BUSINESS MACHINES CORPORATION
To: SERVICENOW, INC.
Reel/Frame 045040/0710 →
CONVEYOR IS ASSIGNING UNDIVIDED 50% INTEREST Recorded Nov 8, 2017
From: INTERNATIONAL BUSINESS MACHINES CORPORATION
To: SERVICENOW, INC.; INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 044413/0144 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 19, 2008
From: POPOV, PETKO; SIELIAN, MICHAEL
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 020528/0523 →