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:
what expect opening call hierarchy of method methoddepth1()
show until main
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
Post a Comment