ThreeState (ReferenceChainLink link, PsiMember member, List<? extends PsiClass> samClasses) { if (link.isCall) { return member instanceof PsiMethod && argIndex >= 0 ? hasCompatibleParameter((PsiMethod)member, argIndex, samClasses) : ThreeState.NO; } if (member instanceof PsiClass) { return ThreeState.fromBoolean(samClasses.contains(member)); } return member instanceof PsiField ? canPassFunctionalExpression(samClasses, ((PsiField)member).getType(), member) : ThreeState.NO; }