/** * Initialisation routine called after handler creation * with the element name and attributes. This configures * the element with its attributes and sets it up with * its parent container (if any). Nested elements are then * added later as the parser encounters them. * * @param propType Name of the element which caused this handler * to be created. Must not be <code>null</code>. * * @param attrs Attributes of the element which caused this * handler to be created. Must not be <code>null</code>. * * @exception SAXParseException in case of error, such as a * BuildException being thrown during configuration. */ public void init(String propType, AttributeList attrs) throws SAXParseException { try { element = helperImpl.project.createDataType(propType); if (element == null) { throw new BuildException("Unknown data type " + propType); } wrapper = new RuntimeConfigurable(element, propType); wrapper.setAttributes(attrs); target.addDataType(wrapper); } catch (BuildException exc) { throw new SAXParseException(exc.getMessage(), helperImpl.locator, exc); } }