摘要 |
A method, program and system for automatic reengineering of an input client code using an API when an API adapter code, is provided for emulating an old version of the API on a new version of the API, wherein the items no more provided in new API are identified, said method comprising the steps of parsing ( 200 ) the API adapter source code into a memory representation of this code; building ( 210 ) an index of the items of the API adapter code memory representation which have been identified; generating ( 220 ) a parametrized code memory representation of replacement code for the calls to the identified items; parsing ( 230 ) the input client code into a memory representation of this code; searching ( 240 ) in the memory representation of the input client code the calls to an identified item and reading the corresponding call parameters; replacing ( 260 ) the calls by the code memory representation of replacement code using the call parameters read in the preceding step; and, generating ( 270 ) the code corresponding to the memory representation of the input client code wherein the calls have been replaced.
|