Java 8 Lambda Type Cast ------ (
2021-09-12 本文已影响0人
帕博雷克斯丢丢
Question:
下面的代码在干嘛?
getSpringFactoriesInstances(Bootstrapper.class).stream()
.map((bootstrapper) -> ((BootstrapRegistryInitializer) bootstrapper::initialize))
.forEach(initializers::add);
问点是这段:
(bootstrapper) -> ((BootstrapRegistryInitializer) bootstrapper::initialize)