@Override public Quickfix processElement(ParserContext handlerManager, Element element) throws ConfigurationException { String name = $(element).attr("name"); String quickfixTypeStr = $(element).attr("type"); Quickfix quickfix = new Quickfix(); quickfix.setName(name); quickfix.setType(QuickfixType.valueOf(quickfixTypeStr)); List<Element> children = $(element).children().get(); for (Element child : children) { switch (child.getNodeName()) { case "newline": quickfix.setNewline(StringUtils.trim(child.getFirstChild().getNodeValue())); break; case "replacement": quickfix.setReplacementStr(StringUtils.trim(child.getFirstChild().getNodeValue())); break; case "search": quickfix.setSearchStr(StringUtils.trim(child.getFirstChild().getNodeValue())); break; case "implementationID": quickfix.setTransformationID(StringUtils.trim(child.getFirstChild().getNodeValue())); } } return quickfix; }
@Override public Quickfix processElement(ParserContext handlerManager, Element element) throws ConfigurationException { String name = $(element).attr("name"); String quickfixTypeStr = $(element).attr("type"); Quickfix quickfix = new Quickfix(); quickfix.setName(name); quickfix.setType(QuickfixType.valueOf(quickfixTypeStr)); List<Element> children = $(element).children().get(); for (Element child : children) { switch (child.getNodeName()) { case "newline": quickfix.setNewline(StringUtils.trim(child.getFirstChild().getNodeValue())); break; case "replacement": quickfix.setReplacementStr(StringUtils.trim(child.getFirstChild().getNodeValue())); break; case "search": quickfix.setSearchStr(StringUtils.trim(child.getFirstChild().getNodeValue())); break; case "implementationID": quickfix.setTransformationID(StringUtils.trim(child.getFirstChild().getNodeValue())); } } return quickfix; }