mardi 27 août 2019

How to search for method usage on a .java file?

My application searches for some methods via reflection. Then, I need to search for the usage of those methods on some .java files. Right now I am able to match the method name, and number of arguments, but not the type of the argument.

For example: .get("testObject") gets matched by the method signature .get(java.lang.String) , which is correct, and the method .get(java.lang.Boolean), because of the same method name ("get") and number of arguments (1 argument).

How can I manage to also check for the type? Is there any efficient way, or literature, on finding method usage inside text (or .java) files? I could not find much.

Any help is appreciated.





Aucun commentaire:

Enregistrer un commentaire