@Test public void configureSimpleProperties() throws Exception { StringBuilder string0 = new StringBuilder(200) .append("<configuration>\n") .append(" <port>80</port>\n") .append(" <host>www.google.com</host>\n") .append(" <url>http: .append("</configuration>") .append(""); ByteArrayInputStream is = new ByteArrayInputStream(string0.toString().getBytes()); XmlParser parser = new XmlParser(); XmlParser.Node rootNode = parser.parse(is); SimpleConfiguration config = new SimpleConfiguration(); XmlBean bean = new XmlBean(); bean.configure(rootNode, config); Assert.assertNull(config.size); Assert.assertEquals(80, config.port); Assert.assertEquals("www.google.com", config.host); Assert.assertEquals("http: }
public void configure(String xml, Object obj) throws XmlBeanException, IOException, SAXException { configure(xml, obj, null); }
XmlBean { public void configure(String xml, Object obj) throws XmlBeanException, IOException, SAXException { configure(xml, obj, null); } }
XmlBean { public void configure(String xml, Object obj) throws XmlBeanException, IOException, SAXException { configure(xml, obj, null); } XmlBean(); }
XmlBean { public void configure(String xml, Object obj) throws XmlBeanException, IOException, SAXException { configure(xml, obj, null); } XmlBean(); void setRootTag(String value); void setAccessPrivateProperties(boolean value); void configure(String xml, Object obj); void configure(String xml, Object obj, String xpath); void configure(InputStream in, Object obj); void configure(InputStream in, Object obj, String xpath); void configure(File file, Object obj); void configure(File file, Object obj, String xpath); void configure(XmlParser.Node rootNode, Object obj, String xpath); void configure(XmlParser.Node rootNode, Object obj); CollectionHelper createCollectionHelper(XmlParser.Node node, Object obj, Object value, String propertyName, BeanProperty property, String valueAttrString, String keyAttrString); }
XmlBean { public void configure(String xml, Object obj) throws XmlBeanException, IOException, SAXException { configure(xml, obj, null); } XmlBean(); void setRootTag(String value); void setAccessPrivateProperties(boolean value); void configure(String xml, Object obj); void configure(String xml, Object obj, String xpath); void configure(InputStream in, Object obj); void configure(InputStream in, Object obj, String xpath); void configure(File file, Object obj); void configure(File file, Object obj, String xpath); void configure(XmlParser.Node rootNode, Object obj, String xpath); void configure(XmlParser.Node rootNode, Object obj); CollectionHelper createCollectionHelper(XmlParser.Node node, Object obj, Object value, String propertyName, BeanProperty property, String valueAttrString, String keyAttrString);  }