From 367ba05c85b76542d0b59ad4a996cd6a3884594b Mon Sep 17 00:00:00 2001
From: Abhi MethodHandle
. Read more about it
here
invoke-custom
-
- In Java bytecode, lambda expressions usually get implemented through
- something called the LambdaMetafactory
,
- which can create a functional interface at runtime.
-
- In Android’s Dalvik bytecode, even though invoke-custom
can
- support dynamic calls similar to Java’s invokedynamic
,
- standard lambdas don’t typically get compiled into
- invoke-custom
. Instead, they are often translated into
- anonymous inner classes(like if you do in an android
- project they get converted to synthetic subclasses)
- or something similar in the DEX files.
-
invoke-custom
is Actually Used
- invoke-custom
is intended for scenarios that need: