I have a script where I have code written against version 1 of the library, but I want to send version 2 of the library. The code is sent and therefore not changed. I am worried that it might try to access classes or library members that existed in v1 but were deleted in v2.
I decided that it would be possible to write a tool to do a simple check to see if the code would link to a newer version of the library. I appreciate that the code can still be very broken, even if there are links to the code. I think about it on the other hand - if the code is not connected, I can be sure that there is a problem.
As far as I can tell, I need to do a bytecode check for references, method calls, and library class calls, and then use reflection to check if a class / member exists.
I have three questions:
(1) Does such a tool already exist?
(2) I have a feeling of trembling, which is much more complicated than I imagine, and that I missed something important - is that the case?
(3) Do you know about a convenient library that would allow me to check the bytecode so that I can find method calls, links, etc.?
Thank!
source
share