PsiElement () { if (DumbService.isDumb(getProject())) { // Avoid caching in dumb mode, as JavaPsiImplementationHelper.getOriginalClass depends on it return this; } return CachedValuesManager.getCachedValue(this, () -> { JavaPsiImplementationHelper helper = JavaPsiImplementationHelper.getInstance(getProject()); PsiClass result = helper != null ? helper.getOriginalClass(this) : this; return CachedValueProvider.Result.create(result, PsiModificationTracker.MODIFICATION_COUNT); }); }