01: /*
02: * Copyright 2007 Google Inc.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License"); you may not
05: * use this file except in compliance with the License. You may obtain a copy of
06: * the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12: * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13: * License for the specific language governing permissions and limitations under
14: * the License.
15: */
16:
17: package com.google.gwt.user.rebind.rpc.testcases.client;
18:
19: import com.google.gwt.user.client.rpc.IsSerializable;
20:
21: /**
22: * Used to test that the
23: * {@link com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder SerializableTypeOracleBuilder}
24: * will handle covariant arrays correctly. For example, the service interface
25: * below should be able to handle the following covariant array types: AA[],
26: * A[], BB[], B[], CC[], C[], DD[], D[]. Notice that E[] should not be included.
27: */
28: public interface CovariantArrays {
29: /**
30: * Not serializable.
31: */
32: class A implements DD {
33: }
34:
35: /**
36: * Not serializable.
37: */
38: interface AA {
39: }
40:
41: /**
42: * Auto serializable.
43: */
44: class B extends A implements IsSerializable {
45: }
46:
47: /**
48: * Not serializable.
49: */
50: interface BB extends AA {
51: }
52:
53: /**
54: * Not auto serializable due to bad field.
55: */
56: class C extends B {
57: Object field;
58: }
59:
60: /**
61: * Not serializable.
62: */
63: interface CC extends AA {
64: }
65:
66: /**
67: * Auto serializable.
68: */
69: class D extends C implements IsSerializable {
70: }
71:
72: /**
73: * Not serializable.
74: */
75: interface DD extends BB, CC {
76: }
77:
78: /**
79: * Not auto serializable because super class is not.
80: */
81: class E extends C {
82: }
83:
84: AA[] getAs();
85: }
|