TestC2.java revision 2362
2362N/A * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A* @summary Some tests for the generic core reflection api. 0N/A* @author Gilad Bracha 0N/A public abstract T
mt(T t);
0N/A "Superclass of C2 should be a parameterized type";
0N/A "The raw generic superclass of C2 should be C0";
0N/A "Superclass of C2 should have one type argument";
0N/A "Type argument to superclass of C2 should be a type variable";
0N/A "Name of type argument to superclass of C2 should be T1";
0N/A "T1 has one bound (superclass)";
0N/A "Bound of C0 should be a parameterized type";
0N/A "The raw bound of T1 should be C2";
0N/A "Bound of T1 should have three type arguments";
0N/A "First argument to bound of T1 is a type variable";
0N/A "Second argument to bound of T1 is a type variable";
0N/A "Third argument to bound of T1 is a type variable";
0N/A "First type arg to bound of T1 is T1";
0N/A "Seconmd type arg to bound of T1 is T2";
0N/A "Third type arg to bound of T1 is T3";
0N/A "C2 should have three generic superinterfaces";
0N/A "First superinterface of C2 should be a parameterized type";
0N/A "First super interface of C2 is instantiation of I1";
0N/A "First super interface of C2 has 2 type arguments";
0N/A "Second superinterface of C2 should be a parameterized type";
0N/A "Second super interface of C2 is instantiation of I2";
0N/A "Second super interface of C2 has 3 type arguments";
0N/A "Third superinterface of C2 is I3";
0N/A // Test interfaces themselves 0N/A "I3 has two formal type parameters";
0N/A "Name of first formal type arg of I1 is X1";
0N/A "Name of second formal type arg of I1 is X2";
0N/A "The generic and non-generic superclasses of an interface must be the same";
0N/A "I1 has one generic superinterface";
0N/A "Superinterface of I1 is I3";
0N/A "I3 has three formal type parameters";
0N/A "Name of first formal type arg of I2 is E1";
0N/A "Name of second formal type arg of I2 is E2";
0N/A "Name of third formal type arg of I2 is E3";
0N/A "The generic and non-generic superclasses of an interface must be the same";
0N/A "I3 has no formal type parameters";
0N/A "The generic and non-generic superclasses of an interface must be the same";
0N/A "C2 should have three type parameters";
0N/A "T1 should have one bound";
0N/A "The bound of T1 should be a parameterized type";
0N/A "T2 should have one bound";
0N/A "The bound of T2 should be a parameterized type";
0N/A "T3 should have one bound";
0N/A "The bound of T3 should be Throwable";
0N/A "The return type of mc1t should be a parameterized type";
0N/A "The raw return type of mc1t should be C0";
0N/A "Return type of mc1t should have one type argument";
0N/A "Type argument of return type of mc1t is a type variable";
0N/A "Return type of mc1 is C0";
0N/A "Return type of mt is a type variable";
0N/A "C0.mc1t has three parameters";
0N/A "Generic type of the 1st parameter of mc1t(T) is a type variable";
0N/A "Name of 1st type parameter of mc1t is T3, not " +
tv.
getName();
0N/A "T3 should have one bound (mc1t)";
0N/A "The bound of T3 should be Throwable(mc1t)";
0N/A "The type of parameter 2 of mc1t is a parameterized type";
0N/A "Type of parameter 2 of mc1t is instantiation of C0";
0N/A "Type of parameter 2 of mc1t is has null owner";
0N/A "The type of parameter 2 of mc1t has one type argument";
0N/A "The actual type arg of C0<T> is a type variable (mc1t)";
0N/A "mc1t: Name of the type arg of C0<T> is T, not " +
tv.
getName();
0N/A "mc1t: The type argument of C0<T> should have one bound";
0N/A "mc1t: The bound of the type arg of C0<T> should be Object";
0N/A "Type of parameter 3 of mc1t is C0";
0N/A "C2.mc1 has one parameter";
0N/A "C2.mt has one parameter";
0N/A "The generic type of the parameter of mt(T) is a type variable";
0N/A "The name of the type parameter of mt is T2, not " +
tv.
getName();
0N/A "T2 should have one bound";
0N/A "The bound of T2 should be parameterized type";
0N/A "Method C0.mc1t should have no generic exception types";
0N/A "Method C0.mc1 should have no generic exception types";
0N/A "Method C0.mt should have no generic exception types";
0N/A "Method C2.mc1t should have one type parameter";
0N/A "Method C2.mc1 should have two type parameters";
0N/A "Method C2.mt should have no type parameters";
0N/A "The generic type of C0.ft is a type variable";
0N/A "The type of ft should have one bound";
0N/A "The generic type of C0.fc1t is a parameterized type";
0N/A "Type of C2.fc1t is an instantiation of C0";
0N/A "Type of C2.fc1t is has null owner";
0N/A "The type of fc1t has one type argument";
0N/A "The actual type arg of C0<String> is String";
0N/A " Type of C2.fc1 should be C0";
0N/A " Type of C2.fi should be int";
0N/A "Constructor C0(T) should have one generic parameter type";
0N/A "The generic type of the parameter of C0(T2) is a type variable";
0N/A "The name of the type parameter of C2 is T2, not " +
tv.
getName();
0N/A "T should have one bound";
0N/A "Constructor C2(T2) should have no generic exception types";
0N/A "Constructor C2(T2) should have no type parameters";
0N/A "Constructor C0(T) should have one generic parameter type";
0N/A "The generic type of the parameter of C2(T) is a type variable";
0N/A "The name of the type parameter of C2 is T, not " +
tv.
getName();
0N/A "T should have one bound";
0N/A "Constructor C2(T) should have no generic exception types";
0N/A "Constructor C2(T) should have one type parameter";
0N/A "Constructor C2(T1,T2,T4) should have three generic parameter types";
0N/A "The generic type of the first parameter of C2(T1,T2,T4) is a type variable";
0N/A "The name of the type parameter of C2(T1,T2,T4) is T1, not " +
tv.
getName();
0N/A "T should have one bound";
0N/A "Constructor C2(T1,T2,T4) should have no generic exception types";
0N/A "Constructor C2(T1,T2,T4) should have four type parameters";
0N/A "Constructor C2() should have no generic parameter types";
0N/A "Constructor C2() should have one generic exception type";
0N/A "Constructor C2() should have no type parameters";