void (PsiElement position, BiConsumer<? super PsiClass, ? super Boolean> variantAdder) { PsiMethodCallExpression methodCall = PsiTreeUtil.getParentOfType(position, PsiMethodCallExpression.class); if (methodCall != null) { ReflectiveClass ownerClass = getReflectiveClass(methodCall.getMethodExpression().getQualifierExpression()); if (ownerClass != null) { String methodName = methodCall.getMethodExpression().getReferenceName(); if (methodName != null) { variantAdder.accept(ownerClass.getPsiClass(), DECLARED_NAMES.contains(methodName)); } } } }