001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017:
018: /**
019: * @author Serguei S.Zapreyev
020: * @version $Revision$
021: **/package org.apache.harmony.lang.generics;
022:
023: import java.lang.reflect.*;
024:
025: //import java.lang.annotation.Annotation;
026: import java.lang.annotation.Retention;
027: import java.lang.annotation.RetentionPolicy;
028:
029: /*
030: * Created on May 05, 2006
031: *
032: * This TemplateSet class keeps the template set for the java.lang.ClassGenericsTest4 unit test
033: *
034: */
035:
036: public class TemplateSet<X> {
037:
038: @Retention(value=RetentionPolicy.RUNTIME)
039: @interface igt {
040: abstract String author() default "Zapreyev";
041: };
042:
043: @igt
044: class Mc001 {
045: };
046:
047: @igt
048: interface MI001<T0 extends java.io.Serializable> {
049: };
050:
051: @igt
052: interface MI002<T1 extends MI001> {
053: };
054:
055: @igt
056: interface MI003<T2> extends MI001 {
057: };
058:
059: @igt
060: interface MI004<T2> {
061: @igt
062: interface MI005<T21, T22> {
063: };
064: };
065:
066: @igt(author="Serguei Stepanovich Zapreyev")
067: public class Mc002<T3 extends TemplateSet/*Class*/> {
068: @igt
069: public class Mc004<T5 extends TemplateSet/*Integer*/> {
070: };
071: };
072:
073: @igt
074: class Mc003<T4 extends Thread & java.io.Serializable & Cloneable>
075: extends TemplateSet<? super Class>.Mc002<TemplateSet>
076: implements MI002<MI003<java.io.Serializable>>,
077: MI003<MI003<Cloneable>>,
078: MI004.MI005<Type, Type> {
079: };
080:
081: @igt
082: class Mc007\u0391<T7 extends Thread & java.io.Serializable & Cloneable> {
083: };
084:
085: @igt
086: class Mc008\u0576\u06C0\u06F10<T8 extends Mc007? & java.io.Serializable & Cloneable>
087: extends TemplateSet<? super Mc007?>.Mc002<TemplateSet>
088: implements MI002<MI003<java.io.Serializable>>,
089: MI003<MI003<Cloneable>>, MI004.MI005<Mc007?, Type> {
090: };
091:
092: @igt
093: class Mc010\u0576\u06C0\u06F10 {
094: };
095:
096: @igt
097: interface MI010\u0576\u06C0\u06F10 {
098: };
099:
100: @igt
101: class MC011\u0576\u06C0\u06F10 extends Mc010???0
102: implements MI010???0 {
103: };
104:
105: class Mc005 extends Thread implements java.io.Serializable,
106: Cloneable {
107: private static final long serialVersionUID = 0L;
108: };
109:
110: public Mc003<Mc005> fld0;
111: public TemplateSet<? super Class>.Mc002<TemplateSet>.Mc004<TemplateSet> f0;
112: public X f111;
113: public TemplateSet f112;
114:
115: static class Mc009\u0576\u06C0\u06F1 extends Throwable implements
116: java.io.Serializable, Cloneable {
117: private static final long serialVersionUID = 0L;
118: };
119:
120: @igt(author="*****")
121: public <UuUuU extends Throwable, TM1, TM2 extends Thread & java.io.Serializable & Cloneable> void foo1For_5(
122: UuUuU a1) throws UuUuU, java.io.IOException {
123: }
124:
125: public <\u0391 extends Throwable, TM1, TM2, TM3, TM4, TM5, TM6, TM7> X foo2For_5()
126: throws \u0391, java.io.IOException {
127: X f = null;
128: return f;
129: }
130:
131: public <\u0576\u06C0\u06F1 extends Throwable, \u0576\u06C0\u06F11 extends Throwable, \u0576\u06C0\u06F12 extends Throwable, \u0576\u06C0\u06F13 extends Throwable, TM1, TM2 extends Thread & java.io.Serializable & Cloneable> TM2 foo3For_5(
132: ???[] BAAB,
133: TM1 a1,
134: TM2 a2,
135: TemplateSet<? super Class>.Mc002<TemplateSet>.Mc004<TemplateSet> a3)
136: throws \u0576\u06C0\u06F1, Throwable, \u0576\u06C0\u06F13,
137: \u0576\u06C0\u06F12, \u0576\u06C0\u06F11,
138: TemplateSet.Mc009\u0576\u06C0\u06F1 {
139: TM2 f = null;
140: return f;
141: }
142:
143: public Mc003<Mc005> foo4For_5(
144: TemplateSet<? super Class>.Mc002<TemplateSet>.Mc004<?> a1,
145: @igt(author="Czar")
146: Mc003<Mc005> a2, @igt(author="President")
147: Mc003<Mc005>... a3) {
148: return a2;
149: }
150:
151: public TemplateSet<? super Class>.Mc002<TemplateSet>.Mc004<TemplateSet> foo5For_5(
152: X a1,
153: Class<Type> a2,
154: TemplateSet<? super Class>.Mc002<TemplateSet>.Mc004<TemplateSet> a3) {
155: return a3;
156: }
157:
158: class MC006 {
159: @igt(author="*****")
160: public <UuUuU extends Throwable, TM1, TM2 extends Thread & java.io.Serializable & Cloneable> MC006(
161: UuUuU a1) throws UuUuU, java.io.IOException {
162: }
163:
164: public <\u0391 extends Throwable, TM1, TM2, TM3, TM4, TM5, TM6, TM7> MC006()
165: throws \u0391, java.io.IOException {
166: }
167:
168: public <\u0576\u06C0\u06F1 extends Throwable, \u0576\u06C0\u06F11 extends Throwable, \u0576\u06C0\u06F12 extends Throwable, \u0576\u06C0\u06F13 extends Throwable, TM1, TM2 extends Thread & java.io.Serializable & Cloneable> MC006(
169: ???[] BAAB,
170: TM1 a1,
171: TM2 a2,
172: TemplateSet<? super Class>.Mc002<TemplateSet>.Mc004<TemplateSet> a3)
173: throws \u0576\u06C0\u06F1, Throwable,
174: \u0576\u06C0\u06F13, \u0576\u06C0\u06F12,
175: \u0576\u06C0\u06F11 {
176: }
177:
178: public MC006(
179: TemplateSet<? super Class>.Mc002<TemplateSet>.Mc004<?> a1,
180: @igt(author="Czar")
181: Mc003<Mc005> a2, @igt(author="President")
182: Mc003<Mc005>... a3) {
183: }
184:
185: public MC006(
186: X a1,
187: Class<Type> a2,
188: TemplateSet<? super Class>.Mc002<TemplateSet>.Mc004<TemplateSet> a3) {
189: }
190: }
191: }
|