Portable detection of start and completion of object construction
AssigneeSun Microsystems, Inc.
InventorsGrzegorz Jan Czajkowski, Laurent Philippe Daynès
Life of this patent
Estimating the term…
Abstract
A method for tracking a target object, involving identifying at least one portion of code corresponding to a constructor for the target object, and inserting a first tracking method before the at least one portion of code and inserting a second tracking method after the at least one portion of code to obtain executable code, wherein the first tracking method and the second tracking method comprise a calling object reference and a target object reference as arguments.
Claims15
A method for tracking a target object, comprising:
- identifying a portion of code comprising a first constructor for the target object after compiling the portion of code and before executing the portion of code;
- inserting a first tracking method into the portion of code after compiling the portion of code and before executing the portion of code, wherein the first tracking method compares the target object and an object calling the first constructor to generate a first comparison result;
- identifying a second constructor for the target object in the portion of code after compiling the portion of code and before executing the portion of code;
- inserting a second tracking method into the portion of code after compiling the portion of code and before executing the portion of code, wherein the second tracking method compares the target object and an object calling the second constructor to generate a second comparison result;
- and
- executing the portion of code including the first tracking method and the second tracking method to generate an output identifying a creation of the target object, wherein generation of the output is based on the first comparison result and the second comparison result, and wherein the output comprises at least one selected from the group consisting of a target object name, a target object type, a target object creation timestamp, and a target object deletion timestamp.
A computer system for tracking a target object comprising:
- a processor;
- a memory;
- a storage device;
- and
- software instructions stored in the memory and configured to enable the computer system under control of the processor, to:
- identify a portion of code comprising a first constructor for the target object after compiling the portion of code and before executing the portion of code;
- insert a first tracking method into the portion of code after compiling the portion of code and before executing the portion of code, wherein the first tracking method compares the target object and an object calling the first constructor to generate a first comparison result;
- identify a second constructor for the target object in the portion of code after compiling the portion of code and before executing the portion of code;
- insert a second tracking method into the portion of code after compiling the portion of code and before executing the portion of code, wherein the second tracking method compares the target object and an object calling the second constructor to generate a second comparison result;
- and
- execute the portion of code including the first tracking method and the second tracking method to generate an output identifying a creation of the target object, wherein generation of the output is based on the first comparison result and the second comparison result, and wherein the output comprises at least one selected from the group consisting of a target object name, a target object type, a target object creation timestamp, and a target object deletion timestamp.
A computer readable medium storing instructions for tracking a target object, the instructions comprising functionality to:
- identify a portion of code comprising a first constructor for the target object after compiling the portion of code and before executing the portion of code;
- insert a first tracking method into the portion of code after compiling the portion of code and before executing the portion of code, wherein the first tracking method compares the target object and an object calling the first constructor to generate a first comparison result;
- identify a second constructor for the target object in the potion of code after compiling the portion of code and before executing the portion of code;
- insert a second tracking method into the portion of code after compiling the portion of code and before executing the portion of code, wherein the second tracking method compares the target object and an object calling the second constructor to generate a second comparison result;
- and
- execute the portion of code including the first tracking method and the second tracking method to generate an output identifying a creation of the target object, wherein generation of the output is based on the first comparison result and the second comparison result, and wherein the output comprises at least one selected from the group consisting of a target object name, a target object type, a target object creation timestamp, and a target object deletion timestamp.
Dependencies are inferred from the claim text.