Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Groovy dot "override"
def map = [:]
map.test = 1
println map.test
map.xxx = [ aa : 'aa']
println map.xxx.aa
class HasGetter extends Expando {
@Override
Object getProperty(String property) {
return this
}
@Override
String toString() {
"me"
}
}
map.yyy = new HasGetter()
println map.yyy.any.node.I.want.to.use
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment