Clover coverage report - PMD - 3.9 Coverage timestamp: Tue Dec 19 2006 09:38:44 EST FRAMES NO FRAMES |
file stats: | LOC: | 25 |  | Methods: | 1
| NCLOC: | 17 |  | Classes: | 1
Source file | Conditionals | Statements | Methods | TOTAL
JSPTokenizer.java | 0% | 0% | 0% | 0% |

1 |  | /**
2 |  | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3 |  | */
4 |  | package net.sourceforge.pmd.cpd;
5 |  |
6 |  | import net.sourceforge.pmd.jsp.ast.JspCharStream;
7 |  | import net.sourceforge.pmd.jsp.ast.JspParserTokenManager;
8 |  | import net.sourceforge.pmd.jsp.ast.Token;
9 |  |
10 |  | import java.io.StringReader;
11 |  |
12 |  | public class JSPTokenizer implements Tokenizer {
13 |  |
14 | 0 | public void tokenize(SourceCode tokens, Tokens tokenEntries) {
15 | 0 | StringBuffer buffer = tokens.getCodeBuffer();
16 | 0 | JspParserTokenManager tokenMgr = new JspParserTokenManager(new JspCharStream(new StringReader(buffer.toString())));
17 | 0 | Token currentToken = tokenMgr.getNextToken();
18 | 0 | while (currentToken.image.length() > 0) {
19 | 0 | tokenEntries.add(new TokenEntry(String.valueOf(currentToken.kind), tokens.getFileName(), currentToken.beginLine));
20 | 0 | currentToken = tokenMgr.getNextToken();
21 |  | }
22 | 0 | tokenEntries.add(TokenEntry.getEOF());
23 |  | }
24 |  | }
25 |  |