1
2
3
4
5 package com.puppycrawl.tools.checkstyle.filters.suppresswarningsfilter;
6
7
8
9
10
11
12 @SuppressWarnings("foo")
13 class InputSuppressWarningsFilter
14 {
15
16 @SuppressWarnings("foo") interface I { }
17 @SuppressWarnings("foo") enum E { }
18 @SuppressWarnings("foo") InputSuppressWarningsFilter() { }
19 @SuppressWarnings("foo") @interface A { }
20
21
22 @SuppressWarnings("unused") private int I;
23 @SuppressWarnings({"membername"})
24 private int J;
25 private int K;
26
27
28 @SuppressWarnings(value="membername")
29 private int L; private int X;
30
31
32 @SuppressWarnings("checkstyle:ConstantName")
33 private static final int m = 0;
34 private static final int n = 0;
35
36
37 @SuppressWarnings("paramnum")
38
39 public void needsLotsOfParameters(@SuppressWarnings("unused") int a,
40 int b, int c, int d, int e, int f, int g, int h)
41 {
42 @SuppressWarnings("unused") int z;
43 try {
44 }
45 catch (Exception ex) {
46
47 }
48 }
49
50
51 @java.lang.SuppressWarnings("illegalCatch")
52 public void needsToCatchException()
53 {
54 try {
55 }
56 catch (Exception ex) {
57
58 }
59 }
60
61 enum AnEnum {
62 @SuppressWarnings("rawtypes")
63 ELEMENT;
64 }
65 private static final String UNUSED="UnusedDeclaration";
66
67 @SuppressWarnings(UNUSED)
68 public void annotationUsingStringConstantValue(){
69 }
70
71 @SuppressWarnings("checkstyle:uncommentedmain")
72 public static void main(String[] args) {
73
74 }
75
76 static class TestClass1 {
77 @SuppressWarnings("uncommentedmain")
78 public static void main(String[] args) {
79
80 }
81 }
82
83 static class TestClass2 {
84 @SuppressWarnings("UncommentedMain")
85 public static void main(String[] args) {
86
87 }
88 }
89
90 static class TestClass3 {
91 @SuppressWarnings("checkstyle:UncommentedMain")
92 public static void main(String[] args) {
93
94 }
95 }
96
97 @SuppressWarnings("checkstyle:javadoctype")
98 public static abstract class Task {
99 }
100 }