@@ -74,11 +74,13 @@ public void testSimple() {
74
74
"" ,
75
75
"import com.example.annotations.MyAnnotation;" ,
76
76
"import com.example.enums.MyEnum;" ,
77
+ "import java.io.Serializable;" ,
77
78
GeneratedImport .importGeneratedAnnotationType (),
78
79
"" ,
79
80
"@Generated(\" " + AutoAnnotationProcessor .class .getName () + "\" )" ,
80
81
"final class AutoAnnotation_AnnotationFactory_newMyAnnotation" ,
81
- " implements MyAnnotation {" ,
82
+ " implements MyAnnotation, Serializable {" ,
83
+ " private static final long serialVersionUID = 1L;" ,
82
84
" private final MyEnum value;" ,
83
85
" private static final int defaultedValue = 23;" ,
84
86
"" ,
@@ -157,11 +159,13 @@ public void testEmptyPackage() {
157
159
JavaFileObject expectedOutput =
158
160
JavaFileObjects .forSourceLines (
159
161
"AutoAnnotation_AnnotationFactory_newMyAnnotation" ,
162
+ "import java.io.Serializable;" ,
160
163
GeneratedImport .importGeneratedAnnotationType (),
161
164
"" ,
162
165
"@Generated(\" " + AutoAnnotationProcessor .class .getName () + "\" )" ,
163
166
"final class AutoAnnotation_AnnotationFactory_newMyAnnotation" ,
164
- " implements MyAnnotation {" ,
167
+ " implements MyAnnotation, Serializable {" ,
168
+ " private static final long serialVersionUID = 1L;" ,
165
169
" AutoAnnotation_AnnotationFactory_newMyAnnotation() {" ,
166
170
" }" ,
167
171
"" ,
@@ -237,12 +241,14 @@ public void testGwtSimple() {
237
241
"package com.example.factories;" ,
238
242
"" ,
239
243
"import com.example.annotations.MyAnnotation;" ,
244
+ "import java.io.Serializable" ,
240
245
"import java.util.Arrays;" ,
241
246
GeneratedImport .importGeneratedAnnotationType (),
242
247
"" ,
243
248
"@Generated(\" " + AutoAnnotationProcessor .class .getName () + "\" )" ,
244
- "final class AutoAnnotation_AnnotationFactory_newMyAnnotation implements MyAnnotation"
245
- + " {" ,
249
+ "final class AutoAnnotation_AnnotationFactory_newMyAnnotation implements MyAnnotation,"
250
+ + " Serializable {" ,
251
+ " private static final long serialVersionUID = 1L;" ,
246
252
" private final int[] value;" ,
247
253
"" ,
248
254
" AutoAnnotation_AnnotationFactory_newMyAnnotation(int[] value) {" ,
@@ -343,15 +349,17 @@ public void testCollectionsForArrays() {
343
349
"" ,
344
350
"import com.example.annotations.MyAnnotation;" ,
345
351
"import com.example.enums.MyEnum;" ,
352
+ "import java.io.Serializable;" ,
346
353
"import java.util.Arrays;" ,
347
354
"import java.util.Collection;" ,
348
355
"import java.util.List;" ,
349
356
"import java.util.Set;" ,
350
357
GeneratedImport .importGeneratedAnnotationType (),
351
358
"" ,
352
359
"@Generated(\" " + AutoAnnotationProcessor .class .getName () + "\" )" ,
353
- "final class AutoAnnotation_AnnotationFactory_newMyAnnotation implements MyAnnotation"
354
- + " {" ,
360
+ "final class AutoAnnotation_AnnotationFactory_newMyAnnotation implements MyAnnotation,"
361
+ + " Serializable {" ,
362
+ " private static final long serialVersionUID = 1L;" ,
355
363
" private final int[] value;" ,
356
364
" private final MyEnum[] enums;" ,
357
365
"" ,
0 commit comments