View Javadoc
1   ////////////////////////////////////////////////////////////////////////////////
2   // Test case file for checkstyle.
3   // Created: 2015
4   ////////////////////////////////////////////////////////////////////////////////
5   package com.puppycrawl.tools.checkstyle.checks.modifier.redundantmodifier;
6   
7   public class InputRedundantModifierPublicModifierInNotPublicClass {
8       public InputRedundantModifierPublicModifierInNotPublicClass() { }
9       protected class ProtectedClass {
10          public ProtectedClass() {}
11      }
12      public class PublicInnerClass {
13          public PublicInnerClass() { } // OK for class accessible from public scope
14      }
15  }
16  
17  class PackagePrivateClass {
18      public PackagePrivateClass() {} // violation expected
19  }
20  
21  class PackagePrivateClassWithNotRedundantConstructor {
22      PackagePrivateClassWithNotRedundantConstructor() {}
23  
24  }