boolean (@NotNull PsiExpression expr, @NotNull Processor<? super PsiExpression> consumer, @NotNull PsiMethod targetMethod) { PsiType type = expr.getType(); if (type instanceof PsiPrimitiveType) { type = ((PsiPrimitiveType)type).getBoxedType(expr); } PsiClass aClass = PsiUtil.resolveClassInClassTypeOnly(type); if (aClass != null && !CommonClassNames.JAVA_LANG_STRING.equals(aClass.getQualifiedName())) { PsiMethod implicitlyUsedMethod = aClass.findMethodBySignature(targetMethod, true); if (implicitlyUsedMethod != null && (targetMethod == implicitlyUsedMethod || MethodSignatureUtil.isSuperMethod(targetMethod, implicitlyUsedMethod))) { return consumer.process(expr); } } return true; }