/** * Creates a new template. * * @param properties the properties to be given to JAXB (un)marshallers, or {@code null} if none. * @param implementation {@link Implementation#INTERNAL} if the JAXB implementation is the one bundled in JDK 6, or * {@link Implementation#ENDORSED} if this is the external implementation provided as a JAR * file in the endorsed directory. */ PooledTemplate(final Map<String,?> properties, final Implementation implementation) throws PropertyException { super(implementation == Implementation.INTERNAL); if (properties != null) { for (final Map.Entry<String,?> entry : properties.entrySet()) { final String key = entry.getKey(); if (implementation.filterProperty(key)) { setProperty(key, entry.getValue()); } } } }
template = new PooledTemplate(properties, implementation); final Object rootNamespace = template.remove(XML.DEFAULT_NAMESPACE, "");
template = new PooledTemplate(properties, implementation); final Object rootNamespace = template.remove(XML.DEFAULT_NAMESPACE, "");
/** * Creates a new template. * * @param properties the properties to be given to JAXB (un)marshallers, or {@code null} if none. * @param implementation {@link Implementation#INTERNAL} if the JAXB implementation is the one bundled in JDK 6, or * {@link Implementation#ENDORSED} if this is the external implementation provided as a JAR * file in the endorsed directory. */ PooledTemplate(final Map<String,?> properties, final Implementation implementation) throws PropertyException { super(implementation == Implementation.INTERNAL); if (properties != null) { for (final Map.Entry<String,?> entry : properties.entrySet()) { final String key = entry.getKey(); if (implementation.filterProperty(key)) { setProperty(key, entry.getValue()); } } } }