KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sourceforge > pmd > rules > ClassNamingConventions


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 JavaDoc visit(ASTClassOrInterfaceDeclaration node, Object JavaDoc data) {
12         if (Character.isLowerCase(node.getImage().charAt(0))) {
13             addViolation(data, node);
14         }
15         return data;
16     }
17 }
18
Popular Tags