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

后端 未结 2 433
悲&欢浪女
悲&欢浪女 2021-02-02 12:07

Here is my sample java code:

public class Test {

    public static void main(String[] args) {
        methodDepth0(
            ()->
                methodDe         


        
2条回答
  •  爱一瞬间的悲伤
    2021-02-02 12:33

    From what I can tell the lack of call hierarchy depth is due to (re)evaluation of code at runtime. It is explained in 15.27.4 Run-Time Evaluation of Lambda Expressions in the Java Language Specification.

    At run time, evaluation of a lambda expression is similar to evaluation of a class instance creation expression, insofar as normal completion produces a reference to an object. Evaluation of a lambda expression is distinct from execution of the lambda body.

提交回复
热议问题