groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mario Garcia <mario.g...@gmail.com>
Subject [groovy-macro] static method call expressions
Date Mon, 11 Apr 2016 12:26:11 GMT
Hello:

I'm playing a little bit with groovy-macro, BTW it's really cool how easy
you can create statements and expressions.

However I'm having some issues when trying to create an static method call:

*    Statement callJsonOutput(final MapExpression mapExpression) {*
*        return macro(true) { JsonOutput.toJson($v{ mapExpression }) }*
*    }*

When executing the test, it complains because "JsonOutput" class is not
found. That's correct, but I can't make it work either by doing:

*    Statement callJsonOutput(final MapExpression mapExpression) {*
*        return macro(true) { groovy.json.JsonOutput.toJson($v{
mapExpression }) }*
*    }*

Any ideas ?
Mario

Mime
View raw message