/** * Create configuration object with tag name and initialize its attributes. If tag name is <code>property</code> add new * property to last configuration object from stack. In any case reset text builder. */ @Override public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { textBuilder.setLength(0); if (qName.equals("property")) { Config config = stack.peek(); config.setProperty(value(attributes, "name"), value(attributes, "value")); } else { Config config = new Config(qName); if (!stack.isEmpty()) { Config parent = stack.peek(); parent.addChild(config); } stack.push(config); for (int i = 0; i < attributes.getLength(); ++i) { config.setAttribute(attributes.getQName(i), attributes.getValue(i)); } } }
config.setAttribute(name, value(attributes, name));
if (!classDescriptor.hasChildren()) { if (!classDescriptor.hasAttribute("interface")) { classDescriptor.setAttribute("interface", classDescriptor.getAttribute("class"));