forked from phoedos/pmd
updated with Singleton VisitorStarter
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4538 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
@ -15,8 +15,7 @@ import java.util.Map;
|
||||
* @author pieter_van_raemdonck - Application Engineers NV/SA - www.ae.be
|
||||
*/
|
||||
public class JspTypeHandler implements SourceTypeHandler {
|
||||
DummyVisitorStarter dummyVisitor = new DummyVisitorStarter();
|
||||
|
||||
|
||||
public Parser getParser() {
|
||||
return new Parser() {
|
||||
public Object parse(Reader source) throws ParseException {
|
||||
@ -31,7 +30,7 @@ public class JspTypeHandler implements SourceTypeHandler {
|
||||
}
|
||||
|
||||
public VisitorStarter getDataFlowFacade() {
|
||||
return dummyVisitor;
|
||||
return VisitorStarter.dummy;
|
||||
}
|
||||
|
||||
public VisitorStarter getSymbolFacade() {
|
||||
|
@ -8,6 +8,8 @@ package net.sourceforge.pmd.sourcetypehandlers;
|
||||
*/
|
||||
public interface VisitorStarter {
|
||||
|
||||
VisitorStarter dummy = new VisitorStarter() { public void start(Object rootNode) {} };
|
||||
|
||||
/**
|
||||
* Start the visitor, given the root-node of the AST.
|
||||
*
|
||||
|
Reference in New Issue
Block a user