PsiMethod (@NotNull UExpression expression) { if (expression instanceof UCallExpression call && call.isMethodNameOneOf(List.of(GET_CHILDREN_METHOD_NAME))) { return call.resolve(); } else if (expression instanceof UQualifiedReferenceExpression qualifiedReference) { PsiElement selectorPsi = qualifiedReference.getSelector().getSourcePsi(); if (selectorPsi == null) return null; if (GET_CHILDREN_PROPERTY_ACCESS_NAME.equals(selectorPsi.getText())) { PsiElement resolveResult = qualifiedReference.resolve(); return resolveResult instanceof PsiMethod ? (PsiMethod)resolveResult : null; } } return null; }