How to get the name of PsiAnonymousClass? Follow
Answered
In java an Anonymous class has the name parent$number, and I'd like to somehow get that name from PsiAnonymousClass.
But both PsiAnonymousClass.getQualifiedName() and PsiAnonymousClass.getNameIdentifier() return null.
Please sign in to leave a comment.
The PSI represents source-level status where anonymous classes do not have a name.
Thanks. I will work around this issue by getting the parents of the anonymous class until I get a normal class and will create the name from it (even if not accurate).