boolean (@NotNull PsiClass resolve, @NotNull PsiSubstitutor originalSubstitutor, @NotNull Map<PsiTypeParameter, PsiType> substMap) { final PsiTypeParameter[] params = resolve.getTypeParameters(); for (final PsiTypeParameter param : params) { final PsiType original = originalSubstitutor.substitute(param); if (original == null) { substMap.put(param, null); } else { substMap.put(param, substituteInternal(original)); } } if (resolve.hasModifierProperty(PsiModifier.STATIC)) return true; final PsiClass containingClass = resolve.getContainingClass(); return containingClass == null || processClass(containingClass, originalSubstitutor, substMap); }