59 * form is unpredictable, and therefore identity-sensitive operations (such as
60 * reference equality, object locking, and {@code System.identityHashCode()} may
61 * produce different results in different implementations, or even upon
62 * different deserializations in the same implementation.
63 *
64 * @see LambdaMetafactory
65 * @since 1.8
66 */
67 public final class SerializedLambda implements Serializable {
68 @java.io.Serial
69 private static final long serialVersionUID = 8025925345765570181L;
70 private final Class<?> capturingClass;
71 private final String functionalInterfaceClass;
72 private final String functionalInterfaceMethodName;
73 private final String functionalInterfaceMethodSignature;
74 private final String implClass;
75 private final String implMethodName;
76 private final String implMethodSignature;
77 private final int implMethodKind;
78 private final String instantiatedMethodType;
79 private final Object[] capturedArgs;
80
81 /**
82 * Create a {@code SerializedLambda} from the low-level information present
83 * at the lambda factory site.
84 *
85 * @param capturingClass The class in which the lambda expression appears
86 * @param functionalInterfaceClass Name, in slash-delimited form, of static
87 * type of the returned lambda object
88 * @param functionalInterfaceMethodName Name of the functional interface
89 * method for the present at the
90 * lambda factory site
91 * @param functionalInterfaceMethodSignature Signature of the functional
92 * interface method present at
93 * the lambda factory site
94 * @param implMethodKind Method handle kind for the implementation method
95 * @param implClass Name, in slash-delimited form, for the class holding
96 * the implementation method
97 * @param implMethodName Name of the implementation method
98 * @param implMethodSignature Signature of the implementation method
|
59 * form is unpredictable, and therefore identity-sensitive operations (such as
60 * reference equality, object locking, and {@code System.identityHashCode()} may
61 * produce different results in different implementations, or even upon
62 * different deserializations in the same implementation.
63 *
64 * @see LambdaMetafactory
65 * @since 1.8
66 */
67 public final class SerializedLambda implements Serializable {
68 @java.io.Serial
69 private static final long serialVersionUID = 8025925345765570181L;
70 private final Class<?> capturingClass;
71 private final String functionalInterfaceClass;
72 private final String functionalInterfaceMethodName;
73 private final String functionalInterfaceMethodSignature;
74 private final String implClass;
75 private final String implMethodName;
76 private final String implMethodSignature;
77 private final int implMethodKind;
78 private final String instantiatedMethodType;
79 @SuppressWarnings("serial") // Not statically typed as Serializable
80 private final Object[] capturedArgs;
81
82 /**
83 * Create a {@code SerializedLambda} from the low-level information present
84 * at the lambda factory site.
85 *
86 * @param capturingClass The class in which the lambda expression appears
87 * @param functionalInterfaceClass Name, in slash-delimited form, of static
88 * type of the returned lambda object
89 * @param functionalInterfaceMethodName Name of the functional interface
90 * method for the present at the
91 * lambda factory site
92 * @param functionalInterfaceMethodSignature Signature of the functional
93 * interface method present at
94 * the lambda factory site
95 * @param implMethodKind Method handle kind for the implementation method
96 * @param implClass Name, in slash-delimited form, for the class holding
97 * the implementation method
98 * @param implMethodName Name of the implementation method
99 * @param implMethodSignature Signature of the implementation method
|