PsiJavaModuleReference () { if (getParent() instanceof PsiJavaModule && !(getContainingFile() instanceof JavaDummyHolder)) { return null; // module name identifier is not a reference } else { return CachedValuesManager.getCachedValue(this, () -> CachedValueProvider.Result.create(new PsiJavaModuleReferenceImpl(this), this)); } }