void (LinkedHashSet<? super PsiType> set, PsiExpression expr) { if (expr instanceof PsiMethodCallExpression callExpr){ PsiReferenceExpression methodExpr = callExpr.getMethodExpression(); String methodName = methodExpr.getReferenceName(); MethodPattern pattern = myMethodPatternMap.findPattern(methodName, callExpr.getArgumentList().getExpressionCount()); if (pattern != null && pattern.parameterIndex() < 0/* return value */){ PsiExpression qualifier = methodExpr.getQualifierExpression(); if (qualifier != null) { PsiType[] types = guessContainerElementType(qualifier, null); for (PsiType type : types) { if (type instanceof PsiClassType) { if (((PsiClassType)type).resolve() instanceof PsiAnonymousClass) continue; } set.add(type); } } } } }