groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bayareagreg <bayareag...@gmail.com>
Subject How to find out the names of variables used in a groovy expression
Date Sun, 26 Nov 2017 10:32:37 GMT
Hello,

I need to programmatically find out the names of variables used in a
"simple" groovy expression that reads a value from one or more variables.
One can assume the expression is read-only, that is no modifications of any
state will be used. E.g. in an expression like this

"${foo}", it should return "foo"
also same in "${foo.bar.zot}"

is what I am asking possible? If yes please point me in the direction of
which API to use for this.
Thank you in advance




--
Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html

Mime
View raw message