|
1 |
| package net.sourceforge.pmd.sourcetypehandlers; |
|
2 |
| |
|
3 |
| import net.sourceforge.pmd.ast.ASTCompilationUnit; |
|
4 |
| import net.sourceforge.pmd.dfa.DataFlowFacade; |
|
5 |
| import net.sourceforge.pmd.symboltable.SymbolFacade; |
|
6 |
| |
|
7 |
| |
|
8 |
| |
|
9 |
| |
|
10 |
| |
|
11 |
| |
|
12 |
| |
|
13 |
| public abstract class JavaTypeHandler implements SourceTypeHandler { |
|
14 |
| private DataFlowFacade dataFlowFacade = new DataFlowFacade(); |
|
15 |
| private SymbolFacade stb = new SymbolFacade(); |
|
16 |
| |
|
17 |
| |
|
18 |
0
| public VisitorStarter getDataFlowFacade() {
|
|
19 |
0
| return new VisitorStarter() {
|
|
20 |
0
| public void start(Object rootNode) {
|
|
21 |
0
| dataFlowFacade.initializeWith((ASTCompilationUnit) rootNode);
|
|
22 |
| } |
|
23 |
| }; |
|
24 |
| } |
|
25 |
| |
|
26 |
1031
| public VisitorStarter getSymbolFacade() {
|
|
27 |
1031
| return new VisitorStarter() {
|
|
28 |
1031
| public void start(Object rootNode) {
|
|
29 |
1031
| stb.initializeWith((ASTCompilationUnit) rootNode);
|
|
30 |
| } |
|
31 |
| }; |
|
32 |
| } |
|
33 |
| } |