Apparatus and method for dynamically modifying class files during loading for execution
First Claim
1. A computer-implemented method for enabling programmatic semantic modifications to class files as said files are loaded for execution by a loading and execution process, said method comprising the steps of:
- providing an extended class loader;
receiving, by said extended class loader, a request for loading a selected one of said class files, wherein said request is generated from an executing application program and wherein said selected class file contains executable program code to be executed as a part of said application program;
retrieving, by said extended class loader, said selected class file;
determining, by evaluating one or more specified conditions from a stored control file, whether said retrieved class file is to be semantically modified prior to an execution of said executable program code;
if any of said conditions are met, performing the steps of;
applying one or more semantic modifications to said executable program code in said retrieved class file by executing one or more stored transformations associated with said stored conditions, creating a dynamically modified class file; and
delivering said dynamically modified class file as a result of said request; and
if none of said conditions are met, delivering said retrieved class file as said result of said request.
1 Assignment
0 Petitions
Accused Products
Abstract
The present invention discloses a method, computer program product, and system for dynamically and programmatically modifying the semantics and/or logic of class files as they are being loaded for execution. The present invention permits a user to write a control file specifying in a programmatic manner the changes to be applied to class files and the conditions for carrying out the changes. As the class files are loaded, they are analyzed for the desired conditions and if the conditions are found, the control file is applied to them to effect the appropriate changes according to the user'"'"'s control file.
-
Citations
9 Claims
-
1. A computer-implemented method for enabling programmatic semantic modifications to class files as said files are loaded for execution by a loading and execution process, said method comprising the steps of:
-
providing an extended class loader; receiving, by said extended class loader, a request for loading a selected one of said class files, wherein said request is generated from an executing application program and wherein said selected class file contains executable program code to be executed as a part of said application program; retrieving, by said extended class loader, said selected class file; determining, by evaluating one or more specified conditions from a stored control file, whether said retrieved class file is to be semantically modified prior to an execution of said executable program code; if any of said conditions are met, performing the steps of; applying one or more semantic modifications to said executable program code in said retrieved class file by executing one or more stored transformations associated with said stored conditions, creating a dynamically modified class file; and delivering said dynamically modified class file as a result of said request; and if none of said conditions are met, delivering said retrieved class file as said result of said request. - View Dependent Claims (2, 3)
-
-
4. A computer program product for enabling programmatic semantic modifications to class files as said files are loaded for execution by a loading and execution process, said computer program product comprising:
-
a computer-readable storage medium having computer-readable program code means embodied in said medium, said computer-readable program code means comprising; computer-readable program code means for providing an extended class loader; computer-readable program code means for receiving, by said extended class loader, a request for loading a selected one of said class files, wherein said request is generated from an executing application program and wherein said selected class file contains executable program code to be executed as a part of said application program; computer-readable program code means for retrieving, by said extended class loader, said selected class file; computer-readable program code means for determining, by evaluating one or more specified conditions from a stored control file, whether said retrieved class file is to be semantically modified prior to an execution of said executable program code; if any of said conditions are met, computer-readable program code means for; applying one or more semantic modifications to said executable program code in said retrieved class file by executing one or more stored transformations associated with said stored conditions, creating a dynamically modified class file, and delivering said dynamically modified class file as a result of said request; and if none of said conditions are met, computer-readable program code means for delivering said retrieved class file as said result of said request. - View Dependent Claims (5, 6)
-
-
7. A computer system for enabling programmatic semantic modifications to class files as said files are loaded for execution by a loading and execution process, said system comprising:
-
means for providing an extended class loader; means for receiving, by said extended class loader, a request for loading a selected one of said class files, wherein said request is generated from an executing application program and wherein said selected class file contains executable program code to be executed as a part of said application program; means for retrieving, by said extended class loader, said selected class file; means for determining, by evaluating one or more specified conditions from a stored control file, whether said retrieved class file is to be semantically modified prior to an execution of said executable program code; if any of said conditions are met, means for; applying one or more semantic modifications to said executable program code in said retrieved class file by executing one or more stored transformations associated with said stored conditions, creating a dynamically modified class file; and delivering said dynamically modified class file as a result of said request; and if none of said conditions are met, means for delivering said retrieved class file as said result of said request. - View Dependent Claims (8, 9)
-
Specification