Class XmlFactoryBuilder
- java.lang.Object
-
- com.fasterxml.jackson.core.TSFBuilder<XmlFactory,XmlFactoryBuilder>
-
- com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
-
public class XmlFactoryBuilder extends com.fasterxml.jackson.core.TSFBuilder<XmlFactory,XmlFactoryBuilder>
TSFBuilder
implementation for constructingXmlFactory
instances.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.ClassLoader
_classLoaderForStax
OptionalClassLoader
to use for constructingXMLInputFactory
and instances if not explicitly specified by caller.protected int
_formatGeneratorFeatures
Set of {@@code ToXmlGenerator.Feature}s enabled, as bitmask.protected int
_formatParserFeatures
Set ofFromXmlParser.Feature
s enabled, as bitmask.protected java.lang.String
_nameForTextElement
In cases where a start element has both attributes and non-empty textual value, we have to create a bogus property; we will use this as the property name.protected javax.xml.stream.XMLInputFactory
_xmlInputFactory
Stax factory for creating underlying input stream readers; `null` for "use default instance with default settings"protected javax.xml.stream.XMLOutputFactory
_xmlOutputFactory
Stax factory for creating underlying output stream writers; `null` for "use default instance with default settings"
-
Constructor Summary
Constructors Modifier Constructor Description protected
XmlFactoryBuilder()
XmlFactoryBuilder(XmlFactory base)
-
Method Summary
-
Methods inherited from class com.fasterxml.jackson.core.TSFBuilder
_legacyDisable, _legacyDisable, _legacyEnable, _legacyEnable, _this, configure, configure, configure, configure, configure, disable, disable, disable, disable, disable, disable, disable, disable, disable, enable, enable, enable, enable, enable, enable, enable, enable, enable, factoryFeaturesMask, inputDecorator, inputDecorator, outputDecorator, outputDecorator, streamReadFeatures, streamWriteFeatures
-
-
-
-
Field Detail
-
_formatParserFeatures
protected int _formatParserFeatures
Set ofFromXmlParser.Feature
s enabled, as bitmask.
-
_formatGeneratorFeatures
protected int _formatGeneratorFeatures
Set of {@@code ToXmlGenerator.Feature}s enabled, as bitmask.
-
_xmlInputFactory
protected javax.xml.stream.XMLInputFactory _xmlInputFactory
Stax factory for creating underlying input stream readers; `null` for "use default instance with default settings"
-
_xmlOutputFactory
protected javax.xml.stream.XMLOutputFactory _xmlOutputFactory
Stax factory for creating underlying output stream writers; `null` for "use default instance with default settings"
-
_nameForTextElement
protected java.lang.String _nameForTextElement
In cases where a start element has both attributes and non-empty textual value, we have to create a bogus property; we will use this as the property name.Name used for pseudo-property used for returning XML Text value (which does not have actual element name to use). Defaults to empty String, but may be changed for interoperability reasons: JAXB, for example, uses "value" as name.
-
_classLoaderForStax
protected java.lang.ClassLoader _classLoaderForStax
OptionalClassLoader
to use for constructingXMLInputFactory
and instances if not explicitly specified by caller. If not specified, will default toClassLoader
that loaded this class.- Since:
- 2.13
-
-
Constructor Detail
-
XmlFactoryBuilder
protected XmlFactoryBuilder()
-
XmlFactoryBuilder
public XmlFactoryBuilder(XmlFactory base)
-
-
Method Detail
-
formatParserFeaturesMask
public int formatParserFeaturesMask()
-
formatGeneratorFeaturesMask
public int formatGeneratorFeaturesMask()
-
nameForTextElement
public java.lang.String nameForTextElement()
-
xmlInputFactory
public javax.xml.stream.XMLInputFactory xmlInputFactory()
-
defaultInputFactory
protected javax.xml.stream.XMLInputFactory defaultInputFactory()
-
xmlOutputFactory
public javax.xml.stream.XMLOutputFactory xmlOutputFactory()
-
defaultOutputFactory
protected javax.xml.stream.XMLOutputFactory defaultOutputFactory()
-
staxClassLoader
protected java.lang.ClassLoader staxClassLoader()
-
enable
public XmlFactoryBuilder enable(FromXmlParser.Feature f)
-
enable
public XmlFactoryBuilder enable(FromXmlParser.Feature first, FromXmlParser.Feature... other)
-
disable
public XmlFactoryBuilder disable(FromXmlParser.Feature f)
-
disable
public XmlFactoryBuilder disable(FromXmlParser.Feature first, FromXmlParser.Feature... other)
-
configure
public XmlFactoryBuilder configure(FromXmlParser.Feature f, boolean state)
-
enable
public XmlFactoryBuilder enable(ToXmlGenerator.Feature f)
-
enable
public XmlFactoryBuilder enable(ToXmlGenerator.Feature first, ToXmlGenerator.Feature... other)
-
disable
public XmlFactoryBuilder disable(ToXmlGenerator.Feature f)
-
disable
public XmlFactoryBuilder disable(ToXmlGenerator.Feature first, ToXmlGenerator.Feature... other)
-
configure
public XmlFactoryBuilder configure(ToXmlGenerator.Feature f, boolean state)
-
nameForTextElement
public XmlFactoryBuilder nameForTextElement(java.lang.String name)
-
xmlInputFactory
public XmlFactoryBuilder xmlInputFactory(javax.xml.stream.XMLInputFactory xmlIn)
- Since:
- 2.13 (was misnamed as
inputFactory(in) formerly
)
-
xmlOutputFactory
public XmlFactoryBuilder xmlOutputFactory(javax.xml.stream.XMLOutputFactory xmlOut)
- Since:
- 2.13 (was misnamed as
outputFactory(in) formerly
)
-
inputFactory
@Deprecated public XmlFactoryBuilder inputFactory(javax.xml.stream.XMLInputFactory xmlIn)
Deprecated.Since 2.13 usexmlInputFactory()
instead
-
outputFactory
@Deprecated public XmlFactoryBuilder outputFactory(javax.xml.stream.XMLOutputFactory xmlOut)
Deprecated.Since 2.13 usexmlOutputFactory()
instead
-
staxClassLoader
public XmlFactoryBuilder staxClassLoader(java.lang.ClassLoader cl)
Method that can be used to specificClassLoader
for creatingXMLInputFactory
andXMLOutputFactory
instances if those are not explicitly defined by caller: passed to respectivenewFactory()
methods.
NOTE: recommended approach is to explicitly passXMLInputFactory
andXMLOutputFactory
methods instead of relying on JDK SPI mechanism.- Since:
- 2.13
-
build
public XmlFactory build()
- Specified by:
build
in classcom.fasterxml.jackson.core.TSFBuilder<XmlFactory,XmlFactoryBuilder>
-
-