PsiClass (@NotNull String qn, @NotNull GlobalSearchScope scope) { Project project = scope.getProject(); if (project == null) { return null; } if (qn.equals(ABC_MY_INTERFACE)) { if (_myInterface != null) { return _myInterface; } return _myInterface = new LightClass(createDummyJavaFile(project).getClasses()[0]); } return null; }