1 /* 2 MethodCount 3 maxTotal = 1 4 maxPrivate = (default)100 5 maxPackage = (default)100 6 maxProtected = (default)100 7 maxPublic = (default)100 8 tokens = ENUM_DEF 9 10 11 */ 12 13 package com.puppycrawl.tools.checkstyle.checks.sizes.methodcount; 14 15 public class InputMethodCount7 { 16 void method1() { 17 } 18 19 void method2() { 20 } 21 22 enum InnerEnum { // violation 'Total number of methods is 2 (max allowed is 1).' 23 ; 24 25 public static void test1() { 26 Runnable r = (new Runnable() { 27 public void run() { 28 run2(); 29 } 30 31 private void run2() { 32 } 33 }); 34 } 35 36 public static void test2() { 37 } 38 } 39 }