Hi,

currently a language defines its Java rules like this:

   @Override
   public List<Class<? extends Rule>> getRelevantRules() {
     return Arrays.asList(CommaWhitespaceRule.class);
   }

I wonder why we return the class here, instead of an actual object? Like 
this:

   @Override
   public List<Rule> getRelevantRules() {
     ResourceBundle messages = JLanguageTool.getMessageBundle(this);
     return Arrays.asList(new CommaWhitespaceRule(messages));
   }

This way we could get rid of some semi-ugly reflection code in 
Language.java. If there's no reason against it, I will make that change.

Regards
  Daniel


------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Languagetool-devel mailing list
Languagetool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-devel

Reply via email to