Clover coverage report - PMD - 3.9 Coverage timestamp: Tue Dec 19 2006 09:38:44 EST FRAMES NO FRAMES |
file stats: | LOC: | 34 |  | Methods: | 3
| NCLOC: | 28 |  | Classes: | 1
Source file | Conditionals | Statements | Methods | TOTAL
AvoidDollarSigns.java | 100% | 100% | 100% | 100% |

1 |  | package net.sourceforge.pmd.rules.naming;
2 |  |
3 |  | import net.sourceforge.pmd.AbstractRule;
4 |  | import net.sourceforge.pmd.ast.ASTClassOrInterfaceDeclaration;
5 |  | import net.sourceforge.pmd.ast.ASTMethodDeclarator;
6 |  | import net.sourceforge.pmd.ast.ASTVariableDeclaratorId;
7 |  |
8 |  | public class AvoidDollarSigns extends AbstractRule {
9 |  |
10 | 6 | public Object visit(ASTClassOrInterfaceDeclaration node, Object data) {
11 | 6 | if (node.getImage().indexOf('$') != -1) {
12 | 2 | addViolation(data, node);
13 | 2 | return data;
14 |  | }
15 | 4 | return super.visit(node, data);
16 |  | }
17 |  |
18 | 2 | public Object visit(ASTVariableDeclaratorId node, Object data) {
19 | 2 | if (node.getImage().indexOf('$') != -1) {
20 | 1 | addViolation(data, node);
21 | 1 | return data;
22 |  | }
23 | 1 | return super.visit(node, data);
24 |  | }
25 |  |
26 | 2 | public Object visit(ASTMethodDeclarator node, Object data) {
27 | 2 | if (node.getImage().indexOf('$') != -1) {
28 | 1 | addViolation(data, node);
29 | 1 | return data;
30 |  | }
31 | 1 | return super.visit(node, data);
32 |  | }
33 |  |
34 |  | }