protected Object createCheck(ActiveRule activeRule) { Class clazz = checkClassesByKey.get(activeRule.getConfigKey()); if (clazz != null) { return instantiate(activeRule, clazz); } return null; }
/** 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; }