Search usage of psiClass and cast reference back to psiMethod
Answered
I have a inner class B on a class A :
Class A {
private void methodA(){
new B().methodB();
}
private Class B{
private void methodB(){
}
}
}
I am using ReferenceSearch to search the usage of class b but after i retrieve the reference i dont know how to retrieve the method methodA from it:
ReferencesSearch.search(psiClassB).forEach(psiReference->{
PsiMethod methodA = ????
});
Please sign in to leave a comment.
I think i found out how to do it :