Match method signature

I am working on an inspection plugin that needs to identify specific method calls based on an xml file. The file contains methods listed as strings of the format: "packageHierarchy.class.method".

I searched through the forum (forgive me if I missed the answer somewhere), but I can't seem to find a way to extract an method's signature. Currently, I am working with a PsiMethodCallExpression and have been able to get the method name through getReferenceName(). Is there a similar way to extract the class and package?

I apologize if this is trivial. Thank you.

0
Avatar
Permanently deleted user

I figured it out on my own. I'm surprised at the lack of documentation.

For anyone who may need help with this in the future, from the PsiMethodCallExpression you can get the class name through resolveMethod().getContainignClass().getQualifiedName() and the method itself from getMethodExpression().getReferenceName().

Thanks.

0

cheers for posting the solution!

:)

0

请先登录再写评论。