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

1 |  | package net.sourceforge.pmd.rules.strings;
2 |  |
3 |  | import net.sourceforge.pmd.rules.AbstractPoorMethodCall;
4 |  |
5 |  | /**
6 |  | */
7 |  | public class UseIndexOfChar extends AbstractPoorMethodCall {
8 |  |
9 |  | private static final String targetTypeName = "String";
10 |  | private static final String[] methodNames = new String[] { "indexOf", "lastIndexOf" };
11 |  |
12 | 15 | public UseIndexOfChar() {
13 | 15 | super();
14 |  | }
15 |  |
16 |  | /**
17 |  | * Method targetTypeName.
18 |  | * @return String
19 |  | */
20 | 6 | protected String targetTypename() {
21 | 6 | return targetTypeName;
22 |  | }
23 |  |
24 |  | /**
25 |  | * Method methodNames.
26 |  | * @return String[]
27 |  | */
28 | 6 | protected String[] methodNames() {
29 | 6 | return methodNames;
30 |  | }
31 |  |
32 |  | /**
33 |  | * Method isViolationArgument.
34 |  | * @param argIndex int
35 |  | * @param arg String
36 |  | * @return boolean
37 |  | */
38 | 7 | protected boolean isViolationArgument(int argIndex, String arg) {
39 |  |
40 | 7 | return isSingleCharAsString(arg);
41 |  | }
42 |  |
43 |  | }