DocumentBuilderFactoryBuilder { public static final DocumentBuilderFactoryBuilder newInstance() { return new DocumentBuilderFactoryBuilder().withNamespaceAware(true); } DocumentBuilderFactoryBuilder(); static final DocumentBuilderFactoryBuilder newInstance(); static final DocumentBuilderFactoryBuilder newRestrictedInstance(); static final DocumentBuilderFactoryBuilder newInstanceIfNull(DocumentBuilderFactoryBuilder b); static final DocumentBuilderFactoryBuilder newRestrictedInstanceIfNull(DocumentBuilderFactoryBuilder b); static final DocumentBuilderFactoryBuilder newInstanceIfNull(DocumentBuilderFactoryBuilder b, NamespaceContext ctx); DocumentBuilderFactory configure(DocumentBuilderFactory f); DocumentBuilder configure(DocumentBuilder db); DocumentBuilder newDocumentBuilder(DocumentBuilderFactory f); DocumentBuilderFactory build(); DocumentBuilderFactoryBuilder withFeatures(Map<String, Boolean> f); DocumentBuilderFactoryBuilder withFeatures(KeyValuePairSet v); DocumentBuilderFactoryBuilder addFeature(String featureName, Boolean value); DocumentBuilderFactoryBuilder withValidating(Boolean b); DocumentBuilderFactoryBuilder withNamespaceAware(Boolean b); DocumentBuilderFactoryBuilder withNamespaceAware(NamespaceContext b); DocumentBuilderFactoryBuilder withIgnoreWhitespace(Boolean b); DocumentBuilderFactoryBuilder withExpandEntityReferences(Boolean b); DocumentBuilderFactoryBuilder withIgnoreComments(Boolean b); DocumentBuilderFactoryBuilder withCoalescing(Boolean b); DocumentBuilderFactoryBuilder withXIncludeAware(Boolean b); DocumentBuilderFactoryBuilder withEntityResolver(EntityResolver e); static final String DISABLE_DOCTYP; }
@Test public void testNewInstance() { DocumentBuilderFactoryBuilder b = DocumentBuilderFactoryBuilder.newInstance(); assertNotNull(b.getFeatures()); assertEquals(0, b.getFeatures().size()); assertEquals(true, b.getNamespaceAware()); assertEquals(b, DocumentBuilderFactoryBuilder.newInstanceIfNull(b)); assertNotSame(b, DocumentBuilderFactoryBuilder.newInstanceIfNull(null)); }