Lines 1-5
Link Here
|
1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
2 |
* Copyright (c) 2000, 2009 IBM Corporation and others. |
2 |
* Copyright (c) 2000, 2010 IBM Corporation and others. |
3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
Lines 60-66
Link Here
|
60 |
" <U extends Exception> X<T> foo(X<T> x) throws RuntimeException, U {\n" + |
60 |
" <U extends Exception> X<T> foo(X<T> x) throws RuntimeException, U {\n" + |
61 |
" return null;\n" + |
61 |
" return null;\n" + |
62 |
" }\n" + |
62 |
" }\n" + |
63 |
" <K, V> V foo(K key, V value) throws Exception {\n" + |
63 |
" <K, V extends T> V foo(K key, V value) throws Exception {\n" + |
64 |
" return value;\n" + |
64 |
" return value;\n" + |
65 |
" }\n" + |
65 |
" }\n" + |
66 |
"}", |
66 |
"}", |
Lines 1094-1100
Link Here
|
1094 |
assertStringsEqual( |
1094 |
assertStringsEqual( |
1095 |
"Unexpected type parameters", |
1095 |
"Unexpected type parameters", |
1096 |
"K:Ljava.lang.Object;\n" + |
1096 |
"K:Ljava.lang.Object;\n" + |
1097 |
"V:Ljava.lang.Object;\n", |
1097 |
"V:TT;\n", |
1098 |
method.getTypeParameterSignatures()); |
1098 |
method.getTypeParameterSignatures()); |
1099 |
} |
1099 |
} |
1100 |
|
1100 |
|
Lines 1523-1526
Link Here
|
1523 |
"Ljava.util.Collection<Ljava.lang.String;>;", |
1523 |
"Ljava.util.Collection<Ljava.lang.String;>;", |
1524 |
field.getTypeSignature()); |
1524 |
field.getTypeSignature()); |
1525 |
} |
1525 |
} |
|
|
1526 |
|
1527 |
public void testBug246594() throws JavaModelException { |
1528 |
IType type = this.jarRoot.getPackageFragment("generic").getClassFile( |
1529 |
"Z.class").getType(); |
1530 |
ITypeParameter typeParam = type.getTypeParameter("T"); |
1531 |
assertNotNull(typeParam); |
1532 |
assertStringsEqual("Type parameter bounds signatures", |
1533 |
"Ljava.lang.Object;\n" + |
1534 |
"Lgeneric.I<-TT;>;\n", |
1535 |
typeParam.getBoundsSignatures()); |
1536 |
} |
1537 |
|
1538 |
public void testBug246594a() throws JavaModelException { |
1539 |
IType type = this.jarRoot.getPackageFragment("generic").getClassFile( |
1540 |
"X.class").getType(); |
1541 |
IMethod method = type.getMethod("foo", new String[] { "TK;", "TV;" }); |
1542 |
ITypeParameter typeParam = method.getTypeParameter("V"); |
1543 |
assertStringsEqual("Type parameter bounds signatures", |
1544 |
"TT;\n", typeParam.getBoundsSignatures()); |
1545 |
} |
1546 |
|
1526 |
} |
1547 |
} |