Re: MethodHandle accessing private method of outer class

2018-04-01 Thread Jochen Theodorou
On 01.04.2018 05:00, David Holmes wrote: On 1/04/2018 11:13 AM, Jochen Theodorou wrote: On 01.04.2018 01:51, David Holmes wrote: [... Anonymous inner class able to call private method in enclosing class directly using method handles and no helper methods ...] But MethodHandles went to a lot of

Re: MethodHandle accessing private method of outer class

2018-03-31 Thread David Holmes
On 1/04/2018 11:13 AM, Jochen Theodorou wrote: On 01.04.2018 01:51, David Holmes wrote: [... Anonymous inner class able to call private method in enclosing class directly using method handles and no helper methods ...] But MethodHandles went to a lot of trouble to allow the same accesses as th

Re: MethodHandle accessing private method of outer class

2018-03-31 Thread Jochen Theodorou
On 01.04.2018 01:51, David Holmes wrote: [... Anonymous inner class able to call private method in enclosing class directly using method handles and no helper methods ...] But MethodHandles went to a lot of trouble to allow the same accesses as the language permits (though sometimes needing to

Re: MethodHandle accessing private method of outer class

2018-03-31 Thread David Holmes
On 1/04/2018 2:47 AM, Jochen Theodorou wrote: Hi all, I just noticed something I would like to know if that is correct and as specified (before I start using that in my application logic) using java 9.0.4 public class Application {   public Lookup foo() {     Supplier s = new Supplier() {  

MethodHandle accessing private method of outer class

2018-03-31 Thread Jochen Theodorou
Hi all, I just noticed something I would like to know if that is correct and as specified (before I start using that in my application logic) using java 9.0.4 public class Application { public Lookup foo() { Supplier s = new Supplier() { public Lookup get() { return MethodHandles