是否有可能获得在执行上下文Object中调用a 的引用?ClosureClosure
例如:
public class Example {
public Example(){
def a = {return this};
def b = [];
b.metaClass.a = a;
println b.a();
}
}
Run Code Online (Sandbox Code Playgroud)
我希望这个执行返回b而不是实例Example.