boolean (@NotNull PsiExpression expression) { PsiMethodCallExpression call = ObjectUtils.tryCast(expression, PsiMethodCallExpression.class); if (call == null) return false; String name = call.getMethodExpression().getReferenceName(); if (!"get".equals(name) || !isMapRef(call.getMethodExpression().getQualifierExpression())) return false; PsiExpression[] args = call.getArgumentList().getExpressions(); return args.length == 1 && ExpressionUtils.isReferenceTo(args[0], myIterParam); }