SerializedLambda's signature is as follows:
SerializedLambda(Class capturingClass, String functionalInterfaceClass, String functionalInterfaceMethodName, String functionalInterfaceMethodSignature, int implMethodKind, String implClass, String implMethodName, String implMethodSignature, String instantiatedMethodType, Object[] capturedArgs)
Now, I can see that the capturing class is one with deserializeLambda
:
SerializedLambda has a readResolve method that looks for a (possibly private) static method called $deserializeLambda$(SerializedLambda) in the capturing class, invokes that with itself as the first argument
But I didn't get what implClass
is for.
Get the name of the class containing the implementation method.
Isn't the capturing class the one with the implementation method? I tried to serialize lambda functions to see what values that these fields contain but they had the same class. What is the difference between implClass
and capturingClass
?