Top Description Inners Fields Constructors Methods
tools.jackson.dataformat.ion

public Class IonObjectMapper

extends ObjectMapper
Class Inheritance
Known Direct Subclasses
tools.jackson.dataformat.ion.ionvalue.IonValueMapper
Imports
java.io.IOException, java.util.Date, tools.jackson.core.Version, tools.jackson.core.type.TypeReference, tools.jackson.databind.JavaType, .ObjectMapper, tools.jackson.databind.cfg.MapperBuilder, .MapperBuilderState, tools.jackson.databind.deser.DeserializationContextExt, tools.jackson.databind.module.SimpleModule, tools.jackson.databind.ser.SerializationContextExt, tools.jackson.dataformat.ion.ionvalue.IonValueModule, com.amazon.ion.IonDatagram, .IonReader, .IonSystem, .IonValue, .IonWriter, com.amazon.ion.system.IonSystemBuilder

Specialization of ObjectMapper that will set underlying factory to be an instance of IonFactory.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
IonObjectMapper.Builder

Base implementation for "Vanilla" ObjectMapper, used with ION backend.

private static class
IonObjectMapper.SharedWrapper

Helper class to contain dynamically constructed "shared" instance of mapper, should one be needed via shared.

Field Summary

Modifier and TypeField and Description
private static final long
Inherited from tools.jackson.databind.ObjectMapper:
_deserializationConfig_deserializationContexts_injectableValues_rootDeserializers_savedBuilderState_serializationConfig_serializationContexts_streamFactory_typeFactory

Constructor Summary

AccessConstructor and Description
public
public
public

Method Summary

Modifier and TypeMethod and Description
public static IonObjectMapper.Builder
builder()

A builder for a mapper that will use textual writers by default.

public static IonObjectMapper.Builder
builder(IonFactory streamFactory)

A builder for a mapper that will use specified streamFactory, pre-configured.

public static IonObjectMapper.Builder
builder(IonSystem ionSystem)

A builder for a mapper that will use textual writers by default and the provided IonSystem.

public static IonObjectMapper.Builder
builderForBinaryWriters()

A builder for a mapper that will use binary writers by default.

public static IonObjectMapper.Builder
builderForBinaryWriters(IonSystem ionSystem)

A builder for a mapper that will use binary writers by default and the provided IonSystem

public static IonObjectMapper.Builder
builderForTextualWriters()

A builder for a mapper that will use textual writers by default.

public static IonObjectMapper.Builder
builderForTextualWriters(IonSystem ionSystem)

A builder for a mapper that will use textual writers by default and the provided IonSystem.

public IonGenerator
public IonParser
public IonParser
public <T> T
readValue(IonReader r, Class<T> valueType)

Deserialize an Ion value read from the supplied IonReader into a Java type.

public <T> T
readValue(IonReader r, TypeReference<T> valueTypeRef)

Deserialize an Ion value read from the supplied IonReader into a Java type.

public <T> T
readValue(IonReader r, JavaType valueType)

Deserialize an Ion value read from the supplied IonReader into a Java type.

public <T> T
readValue(IonValue value, Class<T> valueType)

Convenience method for converting Ion value into given value type.

public <T> T
readValue(IonValue value, TypeReference<T> valueTypeRef)

Convenience method for converting Ion value into given value type.

public <T> T
readValue(IonValue value, JavaType valueType)

Convenience method for converting Ion value into given value type.

public IonObjectMapper.Builder
rebuild()

Overrides tools.jackson.databind.ObjectMapper.rebuild.

Method for creating a new MapperBuilder for constructing differently configured ObjectMapper instance, starting with current configuration including base settings and registered modules.

public static IonObjectMapper
shared()

Accessor method for getting globally shared "default" IonObjectMapper instance: one that has default configuration, no modules registered, no config overrides.

public IonFactory
tokenStreamFactory()

Overrides tools.jackson.databind.ObjectMapper.tokenStreamFactory.

Method that can be used to get hold of TokenStreamFactory that this mapper uses if it needs to construct JsonParsers and/or JsonGenerators.

public Version
version()

Overrides tools.jackson.databind.ObjectMapper.version.

Implements tools.jackson.core.Versioned.version.

Method that will return version information stored in and read from jar that contains this class.

public void
writeValue(IonWriter w, Object value)

Method that can be used to serialize any Java value as Ion output, using IonWriter provided.

public IonValue
writeValueAsIonValue(Object value)

Method that can be used to map any Java value to an IonValue.

Inherited from tools.jackson.databind.ObjectMapper:
_assertNotNull_configAndWriteValue_convert_deserializationContext_deserializationContext_deserializationContext_findRootDeserializer_initForReading_newReader_newReader_newWriter_newWriter_newWriter_readMapAndClose_readTreeAndClose_readValue_serializationContext_serializationContext_verifyNoTrailingTokens_verifySchemaType_writeCloseableValueacceptJsonFormatVisitoracceptJsonFormatVisitoracceptJsonFormatVisitorbooleanNodeclearCachesconstructTypeconstructTypeconvertValueconvertValueconvertValuecreateArrayNodecreateGeneratorcreateGeneratorcreateGeneratorcreateGeneratorcreateGeneratorcreateGeneratorcreateNonBlockingByteArrayParsercreateNonBlockingByteBufferParsercreateObjectNodecreateParsercreateParsercreateParsercreateParsercreateParsercreateParsercreateParsercreateParsercreateParsercreateParserdeserializationConfiggetInjectableValuesgetNodeFactorygetTypeFactoryisEnabledisEnabledisEnabledisEnabledisEnabledisEnabledisEnabledmissingNodenullNodereaderreaderreaderreaderreaderreaderreaderreaderreaderreaderForreaderForreaderForreaderForArrayOfreaderForListOfreaderForMapOfreaderForUpdatingreaderWithViewreadResolvereadTreereadTreereadTreereadTreereadTreereadTreereadTreereadTreereadTreereadValuereadValuereadValuereadValuereadValuereadValuereadValuereadValuereadValuereadValuereadValuereadValuereadValuereadValuereadValuereadValuereadValuereadValuereadValuereadValuereadValuereadValuereadValuereadValuereadValuereadValuereadValuereadValuereadValuereadValuereadValuereadValuesreadValuesreadValuesregisteredModulesserializationConfigstringNodetreeAsTokenstreeToValuetreeToValuetreeToValueupdateValuevalueToTreewriterwriterwriterwriterwriterwriterwriterwriterwriterwriterwriteReplacewriterForwriterForwriterForwriterWithDefaultPrettyPrinterwriterWithViewwriteTreewriteValuewriteValuewriteValuewriteValuewriteValuewriteValuewriteValueAsByteswriteValueAsStringwriteValueIntoBuffer

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides tools.jackson.databind.ObjectMapper.serialVersionUID.

Constructor Detail

IonObjectMapperback to summary
public IonObjectMapper()
IonObjectMapperback to summary
public IonObjectMapper(IonFactory f)
IonObjectMapperback to summary
public IonObjectMapper(IonObjectMapper.Builder b)

Method Detail

builderback to summary
public static IonObjectMapper.Builder builder()

A builder for a mapper that will use textual writers by default. Same as builderForTextualWriters().

builderback to summary
public static IonObjectMapper.Builder builder(IonFactory streamFactory)

A builder for a mapper that will use specified streamFactory, pre-configured.

builderback to summary
public static IonObjectMapper.Builder builder(IonSystem ionSystem)

A builder for a mapper that will use textual writers by default and the provided IonSystem. Same as builderForTextualWriters(IonSystem).

builderForBinaryWritersback to summary
public static IonObjectMapper.Builder builderForBinaryWriters()

A builder for a mapper that will use binary writers by default.

builderForBinaryWritersback to summary
public static IonObjectMapper.Builder builderForBinaryWriters(IonSystem ionSystem)

A builder for a mapper that will use binary writers by default and the provided IonSystem

builderForTextualWritersback to summary
public static IonObjectMapper.Builder builderForTextualWriters()

A builder for a mapper that will use textual writers by default.

builderForTextualWritersback to summary
public static IonObjectMapper.Builder builderForTextualWriters(IonSystem ionSystem)

A builder for a mapper that will use textual writers by default and the provided IonSystem.

createGeneratorback to summary
public IonGenerator createGenerator(IonWriter out)
Since
3.0
createParserback to summary
public IonParser createParser(IonReader src)
Since
3.0
createParserback to summary
public IonParser createParser(IonValue value)
Since
3.0
readValueback to summary
public <T> T readValue(IonReader r, Class<T> valueType) throws IOException

Deserialize an Ion value read from the supplied IonReader into a Java type.

Note

method does not close the underlying reader

Annotations
@SuppressWarnings:unchecked
readValueback to summary
public <T> T readValue(IonReader r, TypeReference<T> valueTypeRef) throws IOException

Deserialize an Ion value read from the supplied IonReader into a Java type.

Note

method does not close the underlying reader

Annotations
@SuppressWarnings:unchecked, rawtypes
readValueback to summary
public <T> T readValue(IonReader r, JavaType valueType) throws IOException

Deserialize an Ion value read from the supplied IonReader into a Java type.

Note

method does not close the underlying reader

Annotations
@SuppressWarnings:unchecked
readValueback to summary
public <T> T readValue(IonValue value, Class<T> valueType) throws IOException

Convenience method for converting Ion value into given value type.

Annotations
@SuppressWarnings:unchecked
readValueback to summary
public <T> T readValue(IonValue value, TypeReference<T> valueTypeRef) throws IOException

Convenience method for converting Ion value into given value type.

Annotations
@SuppressWarnings:unchecked, rawtypes
readValueback to summary
public <T> T readValue(IonValue value, JavaType valueType) throws IOException

Convenience method for converting Ion value into given value type.

Annotations
@SuppressWarnings:unchecked
rebuildback to summary
public IonObjectMapper.Builder rebuild()

Overrides tools.jackson.databind.ObjectMapper.rebuild.

Doc from tools.jackson.databind.ObjectMapper.rebuild.

Method for creating a new MapperBuilder for constructing differently configured ObjectMapper instance, starting with current configuration including base settings and registered modules.

Annotations
@SuppressWarnings:unchecked
@Override
sharedback to summary
public static IonObjectMapper shared()

Accessor method for getting globally shared "default" IonObjectMapper instance: one that has default configuration, no modules registered, no config overrides. Usable mostly when dealing "untyped" or Tree-style content reading and writing.

tokenStreamFactoryback to summary
public IonFactory tokenStreamFactory()

Overrides tools.jackson.databind.ObjectMapper.tokenStreamFactory.

Doc from tools.jackson.databind.ObjectMapper.tokenStreamFactory.

Method that can be used to get hold of TokenStreamFactory that this mapper uses if it needs to construct JsonParsers and/or JsonGenerators.

Warning

note that all ObjectReader and ObjectWriter instances created by this mapper usually share the same configured TokenStreamFactory, so changes to its configuration will "leak". To avoid such observed changes you should always use "with()" and "without()" method of ObjectReader and ObjectWriter for changing StreamReadFeature and StreamWriteFeature settings to use on per-call basis.

Annotations
@Override
versionback to summary
public Version version()

Overrides tools.jackson.databind.ObjectMapper.version.

Implements tools.jackson.core.Versioned.version.

Doc from tools.jackson.databind.ObjectMapper.version.

Method that will return version information stored in and read from jar that contains this class.

Annotations
@Override
writeValueback to summary
public void writeValue(IonWriter w, Object value) throws IOException

Method that can be used to serialize any Java value as Ion output, using IonWriter provided.

Note

method does not close the underlying writer explicitly

writeValueAsIonValueback to summary
public IonValue writeValueAsIonValue(Object value) throws IOException

Method that can be used to map any Java value to an IonValue.

tools.jackson.dataformat.ion back to summary

public Class IonObjectMapper.Builder

extends MapperBuilder<IonObjectMapper, IonObjectMapper.Builder>
Class Inheritance

Base implementation for "Vanilla" ObjectMapper, used with ION backend.
Since
3.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static class

Field Summary

Inherited from tools.jackson.databind.cfg.MapperBuilder:
_abstractTypeResolvers_baseSettings_classIntrospector_coercionConfigs_configOverrides_datatypeFeatures_defaultAttributes_defaultPrettyPrinter_deserFeatures_deserializationContexts_deserializerFactory_filterProvider_formatReadFeatures_formatWriteFeatures_injectableValues_mapperFeatures_mixInHandler_modules_problemHandlers_savedState_serFeatures_serializationContexts_serializerFactory_streamFactory_streamReadFeatures_streamWriteFeatures_subtypeResolver_typeFactory_typeResolverProviderDEFAULT_ACCESSOR_NAMINGDEFAULT_ANNOTATION_INTROSPECTORDEFAULT_BASE_SETTINGSDEFAULT_DESER_FEATURESDEFAULT_MAPPER_FEATURESDEFAULT_PRETTY_PRINTERDEFAULT_SER_FEATURESDEFAULT_TYPE_RESOLVER_PROVIDERDEFAULT_TYPE_VALIDATORNO_ABSTRACT_TYPE_RESOLVERS

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
protected MapperBuilderState
public IonObjectMapper
build()

Implements abstract tools.jackson.databind.cfg.MapperBuilder.build.

Method to call to create actual mapper instance.

public IonObjectMapper.Builder
configure(IonReadFeature feature, boolean state)

public IonObjectMapper.Builder
configure(IonWriteFeature feature, boolean state)

public IonObjectMapper.Builder
disable(IonReadFeature... features)

public IonObjectMapper.Builder
disable(IonWriteFeature... features)

public IonObjectMapper.Builder
enable(IonReadFeature... features)

public IonObjectMapper.Builder
enable(IonWriteFeature... features)

Inherited from tools.jackson.databind.cfg.MapperBuilder:
_constructModuleContext_defaultClassIntrospector_defaultDefaultAttributes_defaultDefaultTypingResolver_defaultDefaultTypingResolver_defaultDeserializationContexts_defaultMixInHandler_defaultPrettyPrinter_defaultSerializationContexts_defaultSerializerFactory_defaultSubtypeResolver_defaultTypeFactory_defaultTypeResolverProvider_thisaccessorNamingactivateDefaultTypingactivateDefaultTypingactivateDefaultTypingactivateDefaultTypingAsPropertyaddAbstractTypeResolveraddHandleraddMixInaddMixInsaddModuleaddModulesaddModulesaddTypeModifierannotationIntrospectorannotationIntrospectorbaseSettingsbaseSettingsbuildDeserializationConfigbuildSerializationConfigcacheProviderchangeDefaultNullHandlingchangeDefaultPropertyInclusionchangeDefaultVisibilityclassIntrospectorclassIntrospectorclearProblemHandlersconfigureconfigureconfigureconfigureconfigureconfigureconfigureForJackson2constructorDetectordatatypeFeaturesdeactivateDefaultTypingdefaultAttributesdefaultAttributesdefaultBase64VariantdefaultDateFormatdefaultLeniencydefaultLocaledefaultMergeabledefaultPrettyPrinterdefaultPrettyPrinterdefaultTimeZonedeserializationContextsdeserializationContextsdeserializationProblemHandlersdeserializerFactorydeserializerFactorydisabledisabledisabledisabledisabledisableenableenableenableenableenableenableenumNamingStrategyfilterProviderfilterProviderfindAndAddModulesfindAndAddModulesfindModulesfindModuleshandlerInstantiatorinjectableValuesinjectableValuesisEnabledisEnabledisEnabledisEnabledisEnabledisEnabledmixInHandlermixInHandlermixInOverridesnodeFactorypolymorphicTypeValidatorpropertyNamingStrategyregisterSubtypesregisterSubtypesregisterSubtypesremoveAllModulesremoveMixInsaveStateApplyModulesserializationContextsserializationContextsserializerFactoryserializerFactorysetDefaultTypingstreamFactorysubtypeResolversubtypeResolvertypeFactorytypeFactorytypeResolverProvidertypeResolverProviderwithAllCoercionConfigswithAllConfigOverrideswithCoercionConfigwithCoercionConfigwithCoercionConfigDefaultswithConfigOverridewithModules

Constructor Detail

Builderback to summary
public Builder(IonFactory f)
Builderback to summary
public Builder(IonObjectMapper.Builder.StateImpl state)

Method Detail

_saveStateback to summary
protected MapperBuilderState _saveState()

Implements abstract tools.jackson.databind.cfg.MapperBuilder._saveState.

Annotations
@Override
buildback to summary
public IonObjectMapper build()

Implements abstract tools.jackson.databind.cfg.MapperBuilder.build.

Doc from tools.jackson.databind.cfg.MapperBuilder.build.

Method to call to create actual mapper instance.

Implementation detail: usually construction occurs by passing this builder instance to constructor of specific mapper type builder builds.

Annotations
@Override
configureback to summary
public IonObjectMapper.Builder configure(IonReadFeature feature, boolean state)
configureback to summary
public IonObjectMapper.Builder configure(IonWriteFeature feature, boolean state)
disableback to summary
public IonObjectMapper.Builder disable(IonReadFeature... features)
disableback to summary
public IonObjectMapper.Builder disable(IonWriteFeature... features)
enableback to summary
public IonObjectMapper.Builder enable(IonReadFeature... features)
enableback to summary
public IonObjectMapper.Builder enable(IonWriteFeature... features)
tools.jackson.dataformat.ion back to summary

protected Class IonObjectMapper.Builder.StateImpl

extends MapperBuilderState
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected Object
readResolve()

Implements abstract tools.jackson.databind.cfg.MapperBuilderState.readResolve.

Method required to support JDK deserialization; made `abstract` here to ensure sub-classes must implement it.

Inherited from tools.jackson.databind.cfg.MapperBuilderState:
modules

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides tools.jackson.databind.cfg.MapperBuilderState.serialVersionUID.

Constructor Detail

StateImplback to summary
public StateImpl(IonObjectMapper.Builder src)

Method Detail

readResolveback to summary
protected Object readResolve()

Implements abstract tools.jackson.databind.cfg.MapperBuilderState.readResolve.

Doc from tools.jackson.databind.cfg.MapperBuilderState.readResolve.

Method required to support JDK deserialization; made `abstract` here to ensure sub-classes must implement it.

Annotations
@Override
tools.jackson.dataformat.ion back to summary

private final Class IonObjectMapper.SharedWrapper

extends Object
Class Inheritance

Helper class to contain dynamically constructed "shared" instance of mapper, should one be needed via shared.

Field Summary

Modifier and TypeField and Description
private static final IonObjectMapper

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static IonObjectMapper
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

MAPPERback to summary
private static final IonObjectMapper MAPPER

Constructor Detail

SharedWrapperback to summary
private SharedWrapper()

Method Detail

wrappedback to summary
public static IonObjectMapper wrapped()