将方法转换为闭包

可以使用 & 运算符将方法转换为闭包。

def add(def a, def b) { a + b }    

Closure addClosure = this.&add
assert this.add(4, 5) == addClosure(4, 5)