-
Sub-task
-
Resolution: Fixed
-
P4
-
None
-
None
-
None
To represent serialized lambdas, we need a class to capture its serialized form, tentatively called SerializedLambda. It needs to capture the following nominal information about a lambda:
private final String capturingClass;
private final String functionalInterfaceClass;
private final String functionalInterfaceMethodName;
private final String functionalInterfaceMethodSignature;
private final int functionalInterfaceMethodKind;
private final String implClass;
private final String implMethodName;
private final String implMethodSignature;
private final int implMethodKind;
private final String instantiatedMethodType;
private final Object[] capturedArgs;
This class will have a readResolve() method which reflectively (in a doPrivileged block) finds the $deserialize$ method on the capturing class, and passes itself to that method to perform the actual deserialiation.
private final String capturingClass;
private final String functionalInterfaceClass;
private final String functionalInterfaceMethodName;
private final String functionalInterfaceMethodSignature;
private final int functionalInterfaceMethodKind;
private final String implClass;
private final String implMethodName;
private final String implMethodSignature;
private final int implMethodKind;
private final String instantiatedMethodType;
private final Object[] capturedArgs;
This class will have a readResolve() method which reflectively (in a doPrivileged block) finds the $deserialize$ method on the capturing class, and passes itself to that method to perform the actual deserialiation.