boolean (PsiMethodReferenceExpression methodRef) { if (methodRef == null) return false; String name = methodRef.getReferenceName(); if (name == null || !myNames.contains(name)) return false; PsiMethod method = ObjectUtils.tryCast(methodRef.resolve(), PsiMethod.class); return methodMatches(method); }