1 /*xml 2 <module name="Checker"> 3 <module name="TreeWalker"> 4 <module name="MethodName"> 5 <property name="format" value="^[a-zA-Z](_?[a-zA-Z0-9]+)*$"/> 6 <property name="allowClassName" value="false"/> 7 </module> 8 </module> 9 </module> 10 */ 11 12 package com.puppycrawl.tools.checkstyle.checks.naming.methodname; 13 14 // xdoc section -- start 15 class Example4 { 16 public Example4() {} 17 // violation below 'Name 'Example4' must not equal the enclosing class name.' 18 public void Example4() {} 19 } 20 // xdoc section -- end