View Javadoc
1   /*
2   MethodLength
3   max = (default)150
4   countEmpty = (default)true
5   tokens = (default)METHOD_DEF , CTOR_DEF , COMPACT_CTOR_DEF
6   
7   
8   */
9   
10  package com.puppycrawl.tools.checkstyle.checks.sizes.methodlength;
11  
12  strictfp final class InputMethodLengthModifierTwo {}
13  
14  /** Holder for redundant 'final' check. */
15  final class RedundantFinalClass
16  {
17      /** redundant 'final' modifier */
18      public final void finalMethod()
19      {
20      }
21  
22      /** OK */
23      public void method()
24      {
25      }
26  }
27  
28  /** Holder for redundant modifiers of inner implementation */
29  abstract interface InnerImplementation
30  {
31      InnerImplementation inner =
32          new InnerImplementation()
33          {
34              /** compiler requires 'public' modifier */
35              public void method()
36              {
37              }
38          };
39  
40      void method();
41  }
42  
43  /** Holder for redundant modifiers of annotation fields/variables */
44  @interface Annotation
45  {
46      public String s1 = "";
47      final String s2 = "";
48      static String s3 = "";
49      String s4 = "";
50      public String blah();
51      abstract String blah2();
52  }
53  
54  @interface MyAnnotation2 {
55  }
56  
57  @interface MyAnnotation4 {
58  }
59  
60  class SafeVarargsUsage {
61      @Deprecated
62      @SafeVarargs
63      private final void foo(int... k) {}
64  
65      @Deprecated
66      @SafeVarargs
67      @SuppressWarnings("")
68      private final void foo1(Object... obj) {}
69  }