Evaluate dynamic code (string), add and retrieve parameters

By neokrates, written on June 3, 2010

groovy   snippet

Rate it
  • 1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
    Loading ... Loading ...
Ad
Poll
  • The setup of your CI environment is?

    • We don't use CI (100%, 8 Votes)
    • Just CI tool located on one of our developers computers (0%, 0 Votes)
    • Dedicated server for single CI tool (0%, 0 Votes)
    • Dedicated servers with independent CI instances (0%, 0 Votes)
    • Dedicated servers for master-slave configuration of CI (0%, 0 Votes)
    • Many CI setups distributed through teams (de-centralized setup) (0%, 0 Votes)
    • We use external cloud for builds (0%, 0 Votes)
    • Different setup (0%, 0 Votes)

    Total Voters: 8

    Vote

    Loading ... Loading ...
Feeds:
  • bodytext bodytext bodytext
Most popular search terms:
1
2
3
4
5
def binding = new Binding(name: 'Neokrates')
def shell = new GroovyShell(binding)
def expression = "print 'your name is ' +name; name = 'anonymous' "
   shell.evaluate(expression)
   print "name was changed to: " + binding.getVariable("name")
 
Does that help to solve your problem?
VN:F [1.8.5_1061]
Rating: 0 (from 0 votes)
0 votes 'YES'  0 votes 'NO'
TAGS
No tags for this post.
RELATED
Pages
Posts
    nope :(
SOCIAL
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • BlinkList
  • Blogosphere News
  • E-mail this story to a friend!
  • Furl
  • LinkArena
  • Live
  • MisterWong
  • Print this article!
  • StumbleUpon
  • Technorati
  • Webnews.de
  • YahooMyWeb

Leave a Reply