Groovy web console

subscribe to the feed Subscribe
to this
site
Groovy Magic (via #groovywebconsole)
tweet this snippet Tweet
this
script

Groovy Magic

Published 6 years ago by Silvio Wangler with tags magic
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
class WellThatIsGroovy {    
    String name
    Date bar
}

def x = 'name'
def j = new WellThatIsGroovy(name : 'hzasdjkfhjk', bar: new Date())

println j."${x}"
println j.'bar'.format('dd.MM.yyyy HH:mm:ss')