What is a bootstrap method?

前端 未结 2 1615
梦如初夏
梦如初夏 2021-02-07 14:45

I have been reading this presentation about java8 lambdas implementation http://fr.slideshare.net/czechscala/java-8-under-the-hood

LambdaMetaFactory cont

2条回答
  •  执念已碎
    2021-02-07 15:10

    There are just two methods in the class: https://docs.oracle.com/javase/8/docs/api/java/lang/invoke/LambdaMetafactory.html

    metafactory() and altMetafactory(). Both mention to be a "bootstrap method for invokedynamic call sites".

    My understanding is that code which implements the handling of the invokedynamic op code eventually uses one of the two when the target of the invocation is a lambda expression.

    The term "bootstrapping" in this context means that it prepares everything necessary to actually execute the job later.

提交回复
热议问题