1 /*xml 2 <module name="Checker"> 3 <module name="TreeWalker"> 4 <module name="AbbreviationAsWordInName"/> 5 </module> 6 </module> 7 8 9 */ 10 11 package com.puppycrawl.tools.checkstyle.checks.naming.abbreviationaswordinname; 12 13 import java.util.HashSet; 14 import java.util.Set; 15 16 // xdoc section -- start 17 class Example1 extends SuperClass { // OK, camel case 18 int CURRENT_COUNTER; // violation 'no more than '4' consecutive capital letters' 19 static int GLOBAL_COUNTER; // OK, static is ignored 20 final Set<String> stringsFOUND = new HashSet<>(); // OK, final is ignored 21 22 @Override 23 public void printCOUNTER() { // OK, overridden method is ignored 24 System.out.println(CURRENT_COUNTER); 25 } 26 // violation below 'no more than '4' consecutive capital letters' 27 void incrementCOUNTER() { 28 CURRENT_COUNTER++; // OK, only definitions are checked 29 } 30 // violation below 'no more than '4' consecutive capital letters' 31 static void incrementGLOBAL() { 32 GLOBAL_COUNTER++; // OK, only definitions are checked 33 } 34 } 35 // xdoc section -- end