View Javadoc

1   /**
2    * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3    */
4   package net.sourceforge.pmd.rules;
5   
6   import net.sourceforge.pmd.AbstractRule;
7   import net.sourceforge.pmd.ast.ASTClassOrInterfaceDeclaration;
8   
9   public class ClassNamingConventions extends AbstractRule {
10  
11      public Object visit(ASTClassOrInterfaceDeclaration node, Object data) {
12          if (Character.isLowerCase(node.getImage().charAt(0))) {
13              addViolation(data, node);
14          }
15          return data;
16      }
17  }