Create system to declare processing stages in an extensible fashion

This commit is contained in:
Clément Fournier
2018-11-01 18:53:18 +01:00
parent efc22da116
commit 5eb1d23a38
27 changed files with 578 additions and 63 deletions

View File

@ -4,21 +4,22 @@
package net.sourceforge.pmd.lang.objectivec;
import net.sourceforge.pmd.lang.AbstractLanguageVersionHandler;
import net.sourceforge.pmd.lang.AbstractCpdLanguageVersionHandler;
import net.sourceforge.pmd.lang.Parser;
import net.sourceforge.pmd.lang.ParserOptions;
import net.sourceforge.pmd.lang.rule.RuleViolationFactory;
/**
* Implementation of LanguageVersionHandler for the Objective-C Language.
*/
public class ObjectiveCHandler extends AbstractLanguageVersionHandler {
public class ObjectiveCHandler extends AbstractCpdLanguageVersionHandler {
@Override
public RuleViolationFactory getRuleViolationFactory() {
throw new UnsupportedOperationException("getRuleViolationFactory() is not supported for Objective-C");
protected String getLanguageName() {
return "Objective-C";
}
@Override
public Parser getParser(ParserOptions parserOptions) {
return new ObjectiveCParser(parserOptions);