// if no matcher is configured throw an Exception
throw new ConfigurationException("Please configure only match or nomatch per mailet");
} else if (matcherName != null) {
matcher = matcherLoader.getMatcher(matcherName);
if (matcher instanceof CompositeMatcher) {
CompositeMatcher compMatcher = (CompositeMatcher) matcher;
List<MatcherManagement> childMatcher = loadCompositeMatchers(processorName, compMap,c.configurationsAt("matcher"));
for (int i = 0 ; i < childMatcher.size(); i++) {
compMatcher.add(childMatcher.get(i));
}
}
} else if (invertedMatcherName != null) {
Matcher m = matcherLoader.getMatcher(invertedMatcherName);
if (m instanceof CompositeMatcher) {
CompositeMatcher compMatcher = (CompositeMatcher) m;
List<MatcherManagement> childMatcher = loadCompositeMatchers(processorName, compMap,c.configurationsAt("matcher"));
for (int i = 0 ; i < childMatcher.size(); i++) {
compMatcher.add(childMatcher.get(i));
}
}
matcher = new MatcherInverter(m);
}
if (matcher == null) throw new ConfigurationException("Unable to load matcher instance");