String (@NotNull PsiExpression expr) { PsiType type = expr.getType(); if (isNumber(type)) { return expr.getText(); } else if (isArray(type)) { return expr.getText() + ".length"; } else if (isIterable(type)) { return expr.getText() + ".size()"; } return null; }