1   package com.puppycrawl.tools.checkstyle.checks.suppresswarningsholder;
2   
3   import java.lang.annotation.ElementType;
4   import java.lang.annotation.Target;
5   import java.util.List;
6   import java.util.Map;
7   
8   
9   public class InputSuppressWarningsHolder5{
10  
11      public static Object foo1(@SuppressWarnings("unused") Object str) {
12          String myString = (@SuppressWarnings("unused") String) str;
13          Object object = new @SuppressWarnings("unused") Object();
14          try {
15              return null;
16              
17          } catch (@SuppressWarnings("unused") Exception ex) {
18              return "";
19          }
20      }
21  
22      void foo2() throws @SuppressWarnings("unused") Exception {  }
23  
24      public void foo3() {
25          Map.@SuppressWarnings("unused") Entry entry;
26          MyObject myObject = new MyObject();
27          myObject.<@SuppressWarnings("unused") String>myMethod();
28          myObject.new @SuppressWarnings("unused") MyObject2();
29      }
30  
31      public static <T> void foo4(Object str) {
32          List<@SuppressWarnings("unused") ? extends Comparable<T>> unchangeable;
33      }
34  
35      abstract class UnmodifiableList<T>
36      implements @SuppressWarnings("unused") List<@SuppressWarnings("unused") T> {
37      }
38  
39      class MyObject{
40          
41          public void myMethod(){};
42          
43          class MyObject2{}
44      }
45  
46      @Target(ElementType.TYPE_USE)
47      @interface SuppressWarnings {
48          String value();
49      }
50  }