// 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(createMatcherConfig(matcherName));
if (matcher instanceof CompositeMatcher) {
CompositeMatcher compMatcher = (CompositeMatcher) matcher;
List<Matcher> childMatcher = loadCompositeMatchers(state, compMap, c.configurationsAt("matcher"));
for (Matcher aChildMatcher : childMatcher) {
compMatcher.add(aChildMatcher);
}
}
} else if (invertedMatcherName != null) {
Matcher m = matcherLoader.getMatcher(createMatcherConfig(invertedMatcherName));
if (m instanceof CompositeMatcher) {
CompositeMatcher compMatcher = (CompositeMatcher) m;
List<Matcher> childMatcher = loadCompositeMatchers(state, compMap, c.configurationsAt("matcher"));
for (Matcher aChildMatcher : childMatcher) {
compMatcher.add(aChildMatcher);
}
}
matcher = new MatcherInverter(m);
}
if (matcher == null)