public GroovyExpression generateCountExpression ( GroovyExpression itExpr ) { GroovyExpression collectionExpr = new CastExpression ( itExpr , "Collection" ) ; return new FunctionCallExpression ( collectionExpr , "size" ) ; }
assumes cast already performed