Top Description Inners Fields Constructors Methods
com.fasterxml.jackson.dataformat.avro

public Class AvroModule

extends Module
Class Inheritance
Imports
java.io.File, .IOException, org.apache.avro.Schema, com.fasterxml.jackson.core.JsonGenerator, .Version, com.fasterxml.jackson.databind.AnnotationIntrospector, .Module, .SerializerProvider, com.fasterxml.jackson.databind.module.SimpleDeserializers, .SimpleSerializers, com.fasterxml.jackson.databind.ser.std.StdSerializer, .ToStringSerializer, com.fasterxml.jackson.dataformat.avro.deser.AvroUntypedDeserializer

Module that adds support for handling datatypes specific to the standard Java Avro library:
Since
2.5

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
AvroModule.SchemaSerializer

References Deprecated StdSerializer is deprecated or references (maybe indirectly) at least one deprecated element.

Field Summary

Modifier and TypeField and Description
protected AnnotationIntrospector
protected static final AvroAnnotationIntrospector

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
protected void
protected void
protected void
public String
getModuleName()

Implements abstract com.fasterxml.jackson.databind.Module.getModuleName.

Method that returns a display that can be used by Jackson for informational purposes, as well as in associating extensions with module that provides them.

public void
setupModule(Module.SetupContext context)

Implements abstract com.fasterxml.jackson.databind.Module.setupModule.

Method called by ObjectMapper when module is registered.

public Version
version()

Implements abstract com.fasterxml.jackson.databind.Module.version.

Implements com.fasterxml.jackson.core.Versioned.version.

Method that returns version of this module.

public AvroModule
withAnnotationIntrospector(AnnotationIntrospector intr)

Fluent method that configures this module instance

Inherited from com.fasterxml.jackson.databind.Module:
getDependenciesgetTypeId

Field Detail

_intrback to summary
protected AnnotationIntrospector _intr
Since
2.9
INTRback to summary
protected static final AvroAnnotationIntrospector INTR

Constructor Detail

AvroModuleback to summary
public AvroModule()

Method Detail

_addDeserializersback to summary
protected void _addDeserializers(Module.SetupContext context)
_addIntrospectorback to summary
protected void _addIntrospector(Module.SetupContext context)
_addModifiersback to summary
protected void _addModifiers(Module.SetupContext context)
_addSerializersback to summary
protected void _addSerializers(Module.SetupContext context)
getModuleNameback to summary
public String getModuleName()

Implements abstract com.fasterxml.jackson.databind.Module.getModuleName.

Doc from com.fasterxml.jackson.databind.Module.getModuleName.

Method that returns a display that can be used by Jackson for informational purposes, as well as in associating extensions with module that provides them.

Annotations
@Override
setupModuleback to summary
public void setupModule(Module.SetupContext context)

Implements abstract com.fasterxml.jackson.databind.Module.setupModule.

Doc from com.fasterxml.jackson.databind.Module.setupModule.

Method called by ObjectMapper when module is registered. It is called to let module register functionality it provides, using callback methods passed-in context object exposes.

Annotations
@Override
versionback to summary
public Version version()

Implements abstract com.fasterxml.jackson.databind.Module.version.

Implements com.fasterxml.jackson.core.Versioned.version.

Doc from com.fasterxml.jackson.databind.Module.version.

Method that returns version of this module. Can be used by Jackson for informational purposes.

Returns:Version

Doc from com.fasterxml.jackson.core.Versioned.version.

Version of the component

Annotations
@Override
withAnnotationIntrospectorback to summary
public AvroModule withAnnotationIntrospector(AnnotationIntrospector intr)

Fluent method that configures this module instance

Since
2.9
com.fasterxml.jackson.dataformat.avro back to summary

public Class AvroModule.SchemaSerializer

extends StdSerializer<Schema>
Class Inheritance

References Deprecated

StdSerializer is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Field Summary

Modifier and TypeField and Description
private static final long
Inherited from com.fasterxml.jackson.databind.ser.std.StdSerializer:
_handledType

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
serialize(Schema
Value to serialize; can not be null.
value
,
JsonGenerator
Generator used to output resulting Json content
gen
,
SerializerProvider
Provider that can be used to get serializers for serializing Objects value contains, if any.
prov
)

Implements abstract com.fasterxml.jackson.databind.ser.std.StdSerializer.serialize.

Method that can be called to ask implementation to serialize values of type this serializer handles.

Inherited from com.fasterxml.jackson.databind.ser.std.StdSerializer:
_neitherNull_nonEmptyacceptJsonFormatVisitorcreateSchemaNodecreateSchemaNodefindAnnotatedContentSerializerfindContextualConvertingSerializerfindConvertingContentSerializerfindFormatFeaturefindFormatOverridesfindIncludeOverridesfindPropertyFiltergetSchemagetSchemahandledTypeisDefaultSerializervisitArrayFormatvisitArrayFormatvisitFloatFormatvisitIntFormatvisitIntFormatvisitStringFormatvisitStringFormatwrapAndThrowwrapAndThrow

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides com.fasterxml.jackson.databind.ser.std.StdSerializer.serialVersionUID.

Constructor Detail

SchemaSerializerback to summary
public SchemaSerializer()

Method Detail

serializeback to summary
public void serialize(Schema value, JsonGenerator gen, SerializerProvider prov) throws IOException

Implements abstract com.fasterxml.jackson.databind.ser.std.StdSerializer.serialize.

Doc from com.fasterxml.jackson.databind.JsonSerializer.serialize.

Method that can be called to ask implementation to serialize values of type this serializer handles.

Parameters
value:Schema

Value to serialize; can not be null.

gen:JsonGenerator

Generator used to output resulting Json content

prov:SerializerProvider

Provider that can be used to get serializers for serializing Objects value contains, if any.

Annotations
@Override