View Javadoc
1   package com.puppycrawl.tools.checkstyle.grammar.antlr4;
2   
3   import static java.lang.annotation.ElementType.TYPE_USE;
4   
5   import java.lang.annotation.Retention;
6   import java.lang.annotation.RetentionPolicy;
7   import java.lang.annotation.Target;
8   
9   public class InputAntlr4AstRegressionAnnotationOnArrays {
10  
11      private String array1 @Nullable [];
12      private @Nullable int array2 @Nullable [] @Nullable [];
13  
14      private InputAntlr4AstRegressionAnnotationOnArrays() {
15      }
16  
17      public static <T> T[] checkNotNullContents(T @Nullable [] array) {
18          if (array == null) {
19              throw new NullPointerException();
20          }
21  
22          return array;
23      }
24  
25      public static <T> T[][] checkNotNullContents2(T @Nullable [] @Nullable [] array) {
26          if (array == null) {
27              throw new NullPointerException();
28          }
29  
30          return array;
31      }
32  
33      public static <T> T @Nullable [] checkNotNullContents3(T array @Nullable []) {
34          if (array == null) {
35              throw new NullPointerException();
36          }
37  
38          return array;
39      }
40  
41      public <T> T checkNotNullContents4(T @Nullable [] array) @Nullable [] {
42          if (array == null) {
43              throw new NullPointerException();
44          }
45          String tmp1 @Nullable [];
46          @Nullable Object[] tmp2 = new @Nullable Integer[3];
47          @Nullable int[] tmp3 = new @Nullable int[3];
48          @Nullable Object tmp4 = new @Nullable String @Nullable [3] @Nullable [2];
49          @Nullable Object tmp5 = new @Nullable int @Nullable [3] @Nullable [2];
50  
51          return array;
52      }
53  }