Externalize creator for XPath rule

This commit is contained in:
Clément Fournier
2020-03-22 04:36:31 +01:00
parent fc304bf70c
commit bcf90ceb8a
17 changed files with 116 additions and 94 deletions

View File

@ -10,9 +10,7 @@ import net.sourceforge.pmd.lang.AbstractLanguageVersionHandler;
import net.sourceforge.pmd.lang.Parser;
import net.sourceforge.pmd.lang.ParserOptions;
import net.sourceforge.pmd.lang.VisitorStarter;
import net.sourceforge.pmd.lang.XPathHandler;
import net.sourceforge.pmd.lang.ast.Node;
import net.sourceforge.pmd.lang.ast.xpath.DefaultASTXPathHandler;
import net.sourceforge.pmd.lang.ecmascript.ast.DumpFacade;
import net.sourceforge.pmd.lang.ecmascript.ast.EcmascriptNode;
import net.sourceforge.pmd.lang.ecmascript.rule.EcmascriptRuleViolationFactory;
@ -23,11 +21,6 @@ import net.sourceforge.pmd.lang.rule.RuleViolationFactory;
*/
public class Ecmascript3Handler extends AbstractLanguageVersionHandler {
@Override
public XPathHandler getXPathHandler() {
return new DefaultASTXPathHandler();
}
@Override
public RuleViolationFactory getRuleViolationFactory() {
return EcmascriptRuleViolationFactory.INSTANCE;