void (PsiMethodReferenceExpression expression) { final String methodName = expression.getReferenceName(); if (isQueryUpdateMethodName(methodName, myQueryNames)) { makeQueried(); } if (isQueryUpdateMethodName(methodName, myUpdateNames)) { makeUpdated(); } final PsiMethod method = ObjectUtils.tryCast(expression.resolve(), PsiMethod.class); if (method != null && (!PsiTypes.voidType().equals(method.getReturnType()) && !PsiTypes.voidType().equals(LambdaUtil.getFunctionalInterfaceReturnType(expression)) || ContainerUtil.or(method.getParameterList().getParameters(), p -> LambdaUtil.isFunctionalType(p.getType())))) { makeQueried(); } }