I need to modify an existing compiled .class file. In fact, I even have the sources of this, but I can’t just change and recompile it because of many dependencies that I don’t have.
Therefore, I need to change 2 methods. Both of them are of type void . The first contains only two lines, which are calls to other methods of the same class, i.e.
public void a() { System.out.println("a"); } public void b() { System.out.println("b"); } public void ca() { a(); b(); }
And I need to change the ca sp method, which only calls the () method.
The second method I need to change contains some logic, but I want to clear it altogether, i.e. have an empty body method that does nothing.
How can i do this?
source share