@@ -1105,7 +1105,7 @@ def generateMainClasses(): Unit = {
11051105 private static final long serialVersionUID = 1L;
11061106
11071107 private final Pattern0<T> pattern;
1108- private final $FunctionType<? super T, ? extends R> f;
1108+ private transient final $FunctionType<? super T, ? extends R> f;
11091109
11101110 private Case0(Pattern0<T> pattern, $FunctionType<? super T, ? extends R> f) {
11111111 this.pattern = pattern;
@@ -1131,13 +1131,18 @@ def generateMainClasses(): Unit = {
11311131 case 2 => BiFunctionType
11321132 case _ => s " Function $i"
11331133 }
1134+ val accessModifier = i match {
1135+ case 1 => " transient final"
1136+ case 2 => " transient final"
1137+ case _ => " final"
1138+ }
11341139 xs """
11351140 public static final class Case $i<T, $generics, R> implements Case<T, R> {
11361141
11371142 private static final long serialVersionUID = 1L;
11381143
11391144 private final Pattern $i<T, $generics> pattern;
1140- private final $functionType< $argTypes, ? extends R> f;
1145+ private $accessModifier $functionType< $argTypes, ? extends R> f;
11411146
11421147 private Case $i(Pattern $i<T, $generics> pattern, $functionType< $argTypes, ? extends R> f) {
11431148 this.pattern = pattern;
@@ -2354,7 +2359,9 @@ def generateMainClasses(): Unit = {
23542359 /**
23552360 * The base interface of all tuples.
23562361 */
2357- public interface Tuple {
2362+ public interface Tuple extends ${im.getType(" java.io.Serializable" )} {
2363+
2364+ long serialVersionUID = 1L;
23582365
23592366 /**
23602367 * The maximum arity of an Tuple.
@@ -2438,7 +2445,10 @@ def generateMainClasses(): Unit = {
24382445 /**
24392446 * Helper to replace reflective array access.
24402447 */
2441- interface ArrayType<T> {
2448+ interface ArrayType<T> extends Serializable {
2449+
2450+ long serialVersionUID = 1L;
2451+
24422452 @SuppressWarnings("unchecked")
24432453 static <T> ArrayType<T> obj() { return (ArrayType<T>) ObjectArrayType.INSTANCE; }
24442454
0 commit comments