1 /* |
1 /* |
2 * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2009, 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. |
52 @TADescription(annotation = "TB", type = THROWS, typeIndex = 2) |
52 @TADescription(annotation = "TB", type = THROWS, typeIndex = 2) |
53 }) |
53 }) |
54 public String interfaceMethod() { |
54 public String interfaceMethod() { |
55 return "interface Test { void test() throws @TA RuntimeException, IllegalArgumentException, @TB Exception; }"; |
55 return "interface Test { void test() throws @TA RuntimeException, IllegalArgumentException, @TB Exception; }"; |
56 } |
56 } |
|
57 |
|
58 @TADescriptions({ |
|
59 @TADescription(annotation = "TA", type = THROWS, typeIndex = 0, |
|
60 genericLocation = {}), |
|
61 @TADescription(annotation = "TB", type = THROWS, typeIndex = 0, |
|
62 genericLocation = {1, 0}), |
|
63 @TADescription(annotation = "TC", type = THROWS, typeIndex = 0, |
|
64 genericLocation = {1, 0, 1, 0}), |
|
65 @TADescription(annotation = "TD", type = THROWS, typeIndex = 1, |
|
66 genericLocation = {}), |
|
67 @TADescription(annotation = "TE", type = THROWS, typeIndex = 1, |
|
68 genericLocation = {1, 0}), |
|
69 @TADescription(annotation = "TF", type = THROWS, typeIndex = 1, |
|
70 genericLocation = {1, 0, 1, 0}) |
|
71 }) |
|
72 public String NestedTypes() { |
|
73 return "class Outer { class Middle { class Inner1 extends Exception {}" + |
|
74 " class Inner2 extends Exception{} } }" + |
|
75 "class Test { void test() throws @TA Outer.@TB Middle.@TC Inner1, @TD Outer.@TE Middle.@TF Inner2 { } }"; |
|
76 } |
57 } |
77 } |