void (final XmlWriter writer) { writer.startElement("component"); try { writeId(writer); // write class writer.addAttribute("class", myComponentClassName); writeBinding(writer); writeConstraints(writer); // write properties (if any) if (myProperties != null) { writer.writeElement(myProperties); } } finally { writer.endElement(); // component } }