1 /* 2 RedundantModifier 3 tokens = (default)METHOD_DEF, VARIABLE_DEF, ANNOTATION_FIELD_DEF, INTERFACE_DEF, \ 4 CTOR_DEF, CLASS_DEF, ENUM_DEF, RESOURCE 5 6 7 */ 8 9 package com.puppycrawl.tools.checkstyle.checks.modifier.redundantmodifier; 10 11 public interface InputRedundantModifierClassesInsideOfInterfaces { 12 13 // Class inside of interface can be abstract and non abstract, but always public static. 14 abstract class A {} 15 16 class B {} 17 18 // All classes inside interfaces are public static classes, and static modifier is redundant. 19 static class C { // violation 20 public static boolean verifyState( A a ) { 21 return true; 22 } 23 } 24 25 public class E {} // violation 26 27 // Enums are static implicit subclasses of Enum class. 28 public enum Role1 { // violation 29 ADMIN, 30 EDITOR, 31 VANILLA; 32 } 33 34 static enum Role2 { // violation 35 ADMIN, 36 EDITOR, 37 VANILLA; 38 } 39 }