All language modules: getInstance()
Use a consistent implementation of getInstance(). Now all modules resolve against the LanguageRegistry.
This commit is contained in:
@ -7,6 +7,7 @@ package net.sourceforge.pmd.lang.ruby;
|
||||
import net.sourceforge.pmd.cpd.AnyTokenizer;
|
||||
import net.sourceforge.pmd.cpd.Tokenizer;
|
||||
import net.sourceforge.pmd.lang.LanguagePropertyBundle;
|
||||
import net.sourceforge.pmd.lang.LanguageRegistry;
|
||||
import net.sourceforge.pmd.lang.impl.CpdOnlyLanguageModuleBase;
|
||||
|
||||
/**
|
||||
@ -15,9 +16,14 @@ import net.sourceforge.pmd.lang.impl.CpdOnlyLanguageModuleBase;
|
||||
* @author Zev Blut zb@ubit.com
|
||||
*/
|
||||
public class RubyLanguageModule extends CpdOnlyLanguageModuleBase {
|
||||
private static final String ID = "ruby";
|
||||
|
||||
public RubyLanguageModule() {
|
||||
super(LanguageMetadata.withId("ruby").name("Ruby").extensions("rb", "cgi", "class"));
|
||||
super(LanguageMetadata.withId(ID).name("Ruby").extensions("rb", "cgi", "class"));
|
||||
}
|
||||
|
||||
public static RubyLanguageModule getInstance() {
|
||||
return (RubyLanguageModule) LanguageRegistry.CPD.getLanguageById(ID);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user