1 comment
Comment actions Permalink

Just typecast PsiFile to PsiJavaFile. Then call getClasses() method.

PsiJavaFile psiJavaFile = (PsiJavaFile)psiFile;
final PsiClass[] classes = psiJavaFile.getClasses();
0

Please sign in to leave a comment.