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:
Brian Remedios
2006-09-23 21:26:27 +00:00
parent 469323e13a
commit 8bb194c57f
2 changed files with 4 additions and 3 deletions

View File

@ -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() {

View File

@ -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.
*