Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Java + Groovy variable binding

 
matej spac
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying to embbed Groovy in Java app.
I know that through Binding object I can bind variables from Java app to Groovy script and use it in script. In my app I am trying to change value of Java variable with Groovy script and it works well:

My question is: is there some way to make java variables updates immediately after shell.evaluate() method calling? For example, if I would have 1000 variables i don't want call for every variable

because of one variable change in script code. Is it possible to ommit this step and update java variables with new value automatically?
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!