throw new IllegalStateException("unknown node " + element.getNodeName());
}
}
private PatternEventMatcher readPatternEvent(Element element) {
PatternEventMatcher patternEventMatcher = new PatternEventMatcher();
if (element.hasAttribute("pattern")) {
Pattern pattern = PatternPropertyEditor.parsePattern(element.getAttribute("pattern"));
patternEventMatcher.setPattern(pattern);
}
if (element.hasAttribute("message")) {
patternEventMatcher.setMessage(element.getAttribute("message"));
}
return patternEventMatcher;
}