|
1 |
| package net.sourceforge.pmd.sourcetypehandlers; |
|
2 |
| |
|
3 |
| import net.sourceforge.pmd.ast.ParseException; |
|
4 |
| import net.sourceforge.pmd.jsp.ast.JspCharStream; |
|
5 |
| import net.sourceforge.pmd.parsers.Parser; |
|
6 |
| import net.sourceforge.pmd.symboltable.JspSymbolFacade; |
|
7 |
| |
|
8 |
| import java.io.Reader; |
|
9 |
| import java.util.HashMap; |
|
10 |
| import java.util.Map; |
|
11 |
| |
|
12 |
| |
|
13 |
| |
|
14 |
| |
|
15 |
| |
|
16 |
| |
|
17 |
| public class JspTypeHandler implements SourceTypeHandler { |
|
18 |
| |
|
19 |
24
| public Parser getParser() {
|
|
20 |
24
| return new Parser() {
|
|
21 |
24
| public Object parse(Reader source) throws ParseException {
|
|
22 |
24
| return new net.sourceforge.pmd.jsp.ast.JspParser(new JspCharStream(source))
|
|
23 |
| .CompilationUnit(); |
|
24 |
| } |
|
25 |
24
| public Map getExcludeMap() {
|
|
26 |
24
| return new HashMap();
|
|
27 |
| } |
|
28 |
24
| public void setExcludeMarker(String marker) {}
|
|
29 |
| }; |
|
30 |
| } |
|
31 |
| |
|
32 |
0
| public VisitorStarter getDataFlowFacade() {
|
|
33 |
0
| return VisitorStarter.dummy;
|
|
34 |
| } |
|
35 |
| |
|
36 |
24
| public VisitorStarter getSymbolFacade() {
|
|
37 |
24
| return new JspSymbolFacade();
|
|
38 |
| } |
|
39 |
| |
|
40 |
0
| public VisitorStarter getTypeResolutionFacade() {
|
|
41 |
0
| return VisitorStarter.dummy;
|
|
42 |
| } |
|
43 |
| |
|
44 |
| } |