equal
deleted
inserted
replaced
24 */ |
24 */ |
25 |
25 |
26 package com.sun.tools.javac.model; |
26 package com.sun.tools.javac.model; |
27 |
27 |
28 import com.sun.tools.javac.util.*; |
28 import com.sun.tools.javac.util.*; |
|
29 import java.io.ObjectInputStream; |
|
30 import java.io.IOException; |
29 import java.lang.annotation.*; |
31 import java.lang.annotation.*; |
30 import java.lang.reflect.Array; |
32 import java.lang.reflect.Array; |
31 import java.lang.reflect.Method; |
33 import java.lang.reflect.Method; |
32 import java.util.LinkedHashMap; |
34 import java.util.LinkedHashMap; |
33 import java.util.Map; |
35 import java.util.Map; |
266 /** |
268 /** |
267 * ExceptionProxy for MirroredTypeException. |
269 * ExceptionProxy for MirroredTypeException. |
268 * The toString, hashCode, and equals methods foward to the underlying |
270 * The toString, hashCode, and equals methods foward to the underlying |
269 * type. |
271 * type. |
270 */ |
272 */ |
271 private static class MirroredTypeExceptionProxy extends ExceptionProxy { |
273 private static final class MirroredTypeExceptionProxy extends ExceptionProxy { |
272 static final long serialVersionUID = 269; |
274 static final long serialVersionUID = 269; |
273 |
275 |
274 private transient final TypeMirror type; |
276 private transient TypeMirror type; |
275 private final String typeString; |
277 private final String typeString; |
276 |
278 |
277 MirroredTypeExceptionProxy(TypeMirror t) { |
279 MirroredTypeExceptionProxy(TypeMirror t) { |
278 type = t; |
280 type = t; |
279 typeString = t.toString(); |
281 typeString = t.toString(); |
294 } |
296 } |
295 |
297 |
296 protected RuntimeException generateException() { |
298 protected RuntimeException generateException() { |
297 return new MirroredTypeException(type); |
299 return new MirroredTypeException(type); |
298 } |
300 } |
|
301 |
|
302 // Explicitly set all transient fields. |
|
303 private void readObject(ObjectInputStream s) |
|
304 throws IOException, ClassNotFoundException { |
|
305 s.defaultReadObject(); |
|
306 type = null; |
|
307 } |
299 } |
308 } |
300 |
309 |
301 |
310 |
302 /** |
311 /** |
303 * ExceptionProxy for MirroredTypesException. |
312 * ExceptionProxy for MirroredTypesException. |
304 * The toString, hashCode, and equals methods foward to the underlying |
313 * The toString, hashCode, and equals methods foward to the underlying |
305 * types. |
314 * types. |
306 */ |
315 */ |
307 private static class MirroredTypesExceptionProxy extends ExceptionProxy { |
316 private static final class MirroredTypesExceptionProxy extends ExceptionProxy { |
308 static final long serialVersionUID = 269; |
317 static final long serialVersionUID = 269; |
309 |
318 |
310 private transient final List<TypeMirror> types; |
319 private transient List<TypeMirror> types; |
311 private final String typeStrings; |
320 private final String typeStrings; |
312 |
321 |
313 MirroredTypesExceptionProxy(List<TypeMirror> ts) { |
322 MirroredTypesExceptionProxy(List<TypeMirror> ts) { |
314 types = ts; |
323 types = ts; |
315 typeStrings = ts.toString(); |
324 typeStrings = ts.toString(); |
331 } |
340 } |
332 |
341 |
333 protected RuntimeException generateException() { |
342 protected RuntimeException generateException() { |
334 return new MirroredTypesException(types); |
343 return new MirroredTypesException(types); |
335 } |
344 } |
|
345 |
|
346 // Explicitly set all transient fields. |
|
347 private void readObject(ObjectInputStream s) |
|
348 throws IOException, ClassNotFoundException { |
|
349 s.defaultReadObject(); |
|
350 types = null; |
|
351 } |
336 } |
352 } |
337 } |
353 } |