View Javadoc
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("unsused") Object str) {
12          String myString = (@SuppressWarnings("unsused") String) str;
13          Object object = new @SuppressWarnings("unsused") Object();
14          try {
15              return null;
16              
17          } catch (@SuppressWarnings("unsused") Exception ex) {
18              return "";
19          }
20      }
21  
22      void foo2() throws @SuppressWarnings("unsused") Exception {  }
23  
24      public void foo3() {
25          Map.@SuppressWarnings("unsused") Entry entry;
26          MyObject myObject = new MyObject();
27          myObject.<@SuppressWarnings("unsused") String>myMethod();
28          myObject.new @SuppressWarnings("unsused") MyObject2();
29      }
30  
31      public static <T> void foo4(Object str) {
32          List<@SuppressWarnings("unsused") ? extends Comparable<T>> unchangeable;
33      }
34  
35      abstract class UnmodifiableList<T>
36      implements @SuppressWarnings("unsused") List<@SuppressWarnings("unsused") 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  }