Author Login
Post Reply
Alexander Veit schrieb:
[...]
> As far as I know one cannot intercept Groovy's variable assignment.
>
> Perhaps there is a way to instrument the script at compile time, but I'm not
> sure...
there are two kinds of assignments in scripts. Bith have the form
foo=bar, but foo can be different things. If foo is not a local
variable, then this statement will write into the Biding. Of course you
can give here a custom Binding, that does any logging you want for reads
and writes to those variables. Then there are local variables... which
offer no regular way. The only way would be, that you add a phase
operation to the compiler that exchanges all the assignments with your
logging code.
bye blackdrag
--
Jochen "blackdrag" Theodorou
The Groovy Project Tech Lead (http://groovy.codehaus.org)
http://blackdragsview.blogspot.com/
http://www.g2one.com/
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email