1 /* |
1 /* |
2 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
829 " Object o1 = new @TA Outer . @TB Inner();" + |
829 " Object o1 = new @TA Outer . @TB Inner();" + |
830 " Object o2 = new @TC MInner();\n" + |
830 " Object o2 = new @TC MInner();\n" + |
831 " }\n" + |
831 " }\n" + |
832 "}}\n"; |
832 "}}\n"; |
833 } |
833 } |
|
834 |
|
835 @TADescriptions({ |
|
836 @TADescription(annotation = "TA", type = CLASS_EXTENDS, |
|
837 genericLocation = {}, typeIndex = -1), |
|
838 @TADescription(annotation = "TB", type = CLASS_EXTENDS, |
|
839 genericLocation = {3, 0}, typeIndex = -1), |
|
840 @TADescription(annotation = "TC", type = CLASS_EXTENDS, |
|
841 genericLocation = {3, 1}, typeIndex = -1), |
|
842 @TADescription(annotation = "TD", type = CLASS_EXTENDS, |
|
843 genericLocation = {1, 0}, typeIndex = -1), |
|
844 @TADescription(annotation = "TE", type = CLASS_EXTENDS, |
|
845 genericLocation = {1, 0, 3, 0}, typeIndex = -1), |
|
846 @TADescription(annotation = "TF", type = CLASS_EXTENDS, |
|
847 genericLocation = {1, 0, 3, 1}, typeIndex = -1) |
|
848 }) |
|
849 @TestClass("GOuter$GInner$Test") |
|
850 public String testExtends1() { |
|
851 return "class GOuter<A, B> {\n" + |
|
852 " class GInner<X, Y> {\n" + |
|
853 " class Test extends @TA GOuter<@TB String, @TC String>.@TD GInner<@TE String, @TF String> {}" + |
|
854 " }" + |
|
855 "}"; |
|
856 } |
|
857 |
|
858 @TADescriptions({ |
|
859 @TADescription(annotation = "TA", type = CLASS_TYPE_PARAMETER, |
|
860 genericLocation = {}, paramIndex = 0), |
|
861 @TADescription(annotation = "TB", type = CLASS_TYPE_PARAMETER_BOUND, |
|
862 genericLocation = {}, paramIndex = 0, boundIndex = 0), |
|
863 @TADescription(annotation = "TC", type = FIELD, |
|
864 genericLocation = {}), |
|
865 @TADescription(annotation = "TD", type = FIELD, |
|
866 genericLocation = {3, 0}) |
|
867 }) |
|
868 @TestClass("Test$1Nested") |
|
869 public String testNestedInMethod1() { |
|
870 return "class Test {\n" + |
|
871 " void foobar() {\n" + |
|
872 " class Nested<@TA X extends @TB Object> {\n" + |
|
873 " @TC List<@TD Object> f;\n" + |
|
874 " }\n" + |
|
875 " }" + |
|
876 "}"; |
|
877 } |
834 } |
878 } |