I hope to record all the return value of method calls whose return value is assigned to a variable.
For example:
before:
int x=Integer.parseInt(args[0]);
after:
int x=Integer.parseInt(args[0]);
System.out.println(x);
For those whose return value is not assigned to a variable, there is no need to record.
Is it possible with JavaParser?
If there isn't a direct solution, this problem may be disintegrated as:
Do read the book if you haven't. You can get it for free if you pay 0,00, and that's okay.
Thanks a lot for your recommendation but my schedule is too tight for me to carefully go over the book or the javadoc. Also, as I鈥檓 not a native English speaker, so I am not competent enough to manage it.
So could you please show me the exact way, or the method to be called, to insert a line statement after a specific statement (ExpressionStmt), instead of at the ending of a BlockStmt?
No, I do not like people who ask me to spend my holiday time on their project because they do not want to read the documentation.