java - Eclipse - `open call hierarchy` stop searching in lambda chain -


here sample java code:

public class test {      public static void main(string[] args) {         methoddepth0(             ()->                 methoddepth1(                     ()->                         methoddepth2()                 )         );     }      static object methoddepth2() {         return null;     }      interface myif {         void call();     }      static void methoddepth0(myif myif){         myif.call();     }      interface myif2 {         void call();     }      static void methoddepth1(myif2 myif2){         myif2.call();     } } 

when open call hierarchy of method methoddepth2() eclipse(4.4), open call hierarchy stop searching next caller: open call hierarchy stop searching next caller method

what expect opening call hierarchy of method methoddepth1() show until main method. opening call hierarchy of method <code>methoddepth1()</code> show until <code>main</code> method

from can tell lack of call hierarchy depth due (re)evaluation of code @ runtime. explained in 15.27.4 run-time evaluation of lambda expressions in java language specification.

at run time, evaluation of lambda expression similar evaluation of class instance creation expression, insofar normal completion produces reference object. evaluation of lambda expression distinct execution of lambda body.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -