コード例 #1
0
 protected Object createCheck(ActiveRule activeRule) {
   Class clazz = checkClassesByKey.get(activeRule.getConfigKey());
   if (clazz != null) {
     return instantiate(activeRule, clazz);
   }
   return null;
 }
コード例 #2
0
 /** Note: disabled rules are excluded. */
 @CheckForNull
 public ActiveRule getActiveRuleByConfigKey(String repositoryKey, String configKey) {
   for (ActiveRule activeRule : activeRules) {
     if (StringUtils.equals(activeRule.getRepositoryKey(), repositoryKey)
         && StringUtils.equals(activeRule.getConfigKey(), configKey)
         && activeRule.isEnabled()) {
       return activeRule;
     }
   }
   return null;
 }