IndexedContainer (@Nullable PsiExpression expression) { expression = PsiUtil.skipParenthesizedExprDown(expression); PsiExpression arrayExpression = PsiUtil.skipParenthesizedExprDown(ExpressionUtils.getArrayFromLengthExpression(expression)); if (arrayExpression != null) { return new ArrayIndexedContainer(arrayExpression); } if (expression instanceof PsiMethodCallExpression call) { if (ListIndexedContainer.isSizeCall(call)) { PsiExpression qualifier = PsiUtil.skipParenthesizedExprDown(ExpressionUtils.getEffectiveQualifier(call.getMethodExpression())); if (qualifier != null) { return new ListIndexedContainer(qualifier); } } } return null; }