View Javadoc

    1   /**
    2    * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
    3    */
    4   package net.sourceforge.pmd.lang.java.rule.naming;
    5
    6   import net.sourceforge.pmd.lang.java.ast.ASTClassOrInterfaceDeclaration;
    7   import net.sourceforge.pmd.lang.java.rule.AbstractJavaRule;
    8
    9   public class ClassNamingConventionsRule extends AbstractJavaRule {
    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  }