Top Fields Constructors Methods
tools.jackson.dataformat.avro.schema

public Class VisitorFormatWrapperImpl

extends Object
implements JsonFormatVisitorWrapper
Class Inheritance
All Implemented Interfaces
tools.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper, tools.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWithSerializationContext
Known Direct Subclasses
tools.jackson.dataformat.avro.schema.AvroSchemaGenerator
Imports
java.time.temporal.Temporal, org.apache.avro.Schema, tools.jackson.core.JsonGenerator, tools.jackson.databind.JavaType, .SerializationContext, tools.jackson.databind.exc.InvalidDefinitionException, tools.jackson.databind.jsonFormatVisitors.*, tools.jackson.dataformat.avro.AvroSchema

Field Summary

Modifier and TypeField and Description
protected SchemaBuilder
_builder

Visitor used for resolving actual Schema, if structured type (or one with complex configuration)

protected SerializationContext
protected boolean
protected final DefinedSchemas
protected Schema
_valueSchema

Schema for simple types that do not need a visitor.

protected boolean
public static final boolean
DEFAULT_ENUM_AS_STRING

Default value for _writeEnumAsString: false as of Jackson 3.0.

public static final boolean
DEFAULT_LOGICAL_TYPES_ENABLED

Default value for _logicalTypesEnabled: true for Jackson 3.x (was false for Jackson 2.x.

Constructor Summary

AccessConstructor and Description
public
protected

Method Summary

Modifier and TypeMethod and Description
private boolean
protected <T> T
protected <T> T
protected VisitorFormatWrapperImpl

Returns:

new instance with shared properties and configuration.
createChildWrapper
()

Creates new VisitorFormatWrapperImpl instance with shared schemas, serialization provider and same configuration.

public VisitorFormatWrapperImpl
disableLogicalTypes()

Disables Avro schema with Logical Types generation.

public VisitorFormatWrapperImpl
disableWriteEnumAsString()

Disable Java enum to Avro string mapping.

public VisitorFormatWrapperImpl
enableLogicalTypes()

Enables Avro schema with Logical Types generation.

public VisitorFormatWrapperImpl
enableWriteEnumAsString()

Enable Java enum to Avro string mapping.

public JsonAnyFormatVisitor
public JsonArrayFormatVisitor
public void
public JsonBooleanFormatVisitor
public JsonIntegerFormatVisitor
public JsonMapFormatVisitor
expectMapFormat(JavaType mapType)

Implements tools.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper.expectMapFormat.

Method called when type is of Java java.util.Map type, and will be serialized as a JSON Object.

public JsonNullFormatVisitor
public JsonNumberFormatVisitor
public JsonObjectFormatVisitor
public JsonStringFormatVisitor
public Schema
public SerializationContext
protected DefinedSchemas
public boolean
public boolean
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_builderback to summary
protected SchemaBuilder _builder

Visitor used for resolving actual Schema, if structured type (or one with complex configuration)

_contextback to summary
protected SerializationContext _context
_logicalTypesEnabledback to summary
protected boolean _logicalTypesEnabled
_schemasback to summary
protected final DefinedSchemas _schemas
_valueSchemaback to summary
protected Schema _valueSchema

Schema for simple types that do not need a visitor.

_writeEnumAsStringback to summary
protected boolean _writeEnumAsString
DEFAULT_ENUM_AS_STRINGback to summary
public static final boolean DEFAULT_ENUM_AS_STRING

Default value for _writeEnumAsString: false as of Jackson 3.0.

DEFAULT_LOGICAL_TYPES_ENABLEDback to summary
public static final boolean DEFAULT_LOGICAL_TYPES_ENABLED

Default value for _logicalTypesEnabled: true for Jackson 3.x (was false for Jackson 2.x.

Constructor Detail

VisitorFormatWrapperImplback to summary
public VisitorFormatWrapperImpl(DefinedSchemas schemas, SerializationContext ctxt)
VisitorFormatWrapperImplback to summary
protected VisitorFormatWrapperImpl(VisitorFormatWrapperImpl src)

Method Detail

_isDateTimeTypeback to summary
private boolean _isDateTimeType(JavaType type)
_throwUnsupportedback to summary
protected <T> T _throwUnsupported()
_throwUnsupportedback to summary
protected <T> T _throwUnsupported(String msg)
createChildWrapperback to summary
protected VisitorFormatWrapperImpl createChildWrapper()

Creates new VisitorFormatWrapperImpl instance with shared schemas, serialization provider and same configuration.

Returns:VisitorFormatWrapperImpl

new instance with shared properties and configuration.

disableLogicalTypesback to summary
public VisitorFormatWrapperImpl disableLogicalTypes()

Disables Avro schema with Logical Types generation.

disableWriteEnumAsStringback to summary
public VisitorFormatWrapperImpl disableWriteEnumAsString()

Disable Java enum to Avro string mapping.

enableLogicalTypesback to summary
public VisitorFormatWrapperImpl enableLogicalTypes()

Enables Avro schema with Logical Types generation.

enableWriteEnumAsStringback to summary
public VisitorFormatWrapperImpl enableWriteEnumAsString()

Enable Java enum to Avro string mapping.

expectAnyFormatback to summary
public JsonAnyFormatVisitor expectAnyFormat(JavaType convertedType)

Implements tools.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper.expectAnyFormat.

Annotations
@Override
expectArrayFormatback to summary
public JsonArrayFormatVisitor expectArrayFormat(final JavaType convertedType)

Implements tools.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper.expectArrayFormat.

Annotations
@Override
expectAvroFormatback to summary
public void expectAvroFormat(AvroSchema schema)
expectBooleanFormatback to summary
public JsonBooleanFormatVisitor expectBooleanFormat(JavaType convertedType)

Implements tools.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper.expectBooleanFormat.

Annotations
@Override
expectIntegerFormatback to summary
public JsonIntegerFormatVisitor expectIntegerFormat(JavaType type)

Implements tools.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper.expectIntegerFormat.

Annotations
@Override
expectMapFormatback to summary
public JsonMapFormatVisitor expectMapFormat(JavaType mapType)

Implements tools.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper.expectMapFormat.

Doc from tools.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper.expectMapFormat.

Method called when type is of Java java.util.Map type, and will be serialized as a JSON Object.

Annotations
@Override
expectNullFormatback to summary
public JsonNullFormatVisitor expectNullFormat(JavaType convertedType)

Implements tools.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper.expectNullFormat.

Annotations
@Override
expectNumberFormatback to summary
public JsonNumberFormatVisitor expectNumberFormat(JavaType convertedType)

Implements tools.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper.expectNumberFormat.

Annotations
@Override
expectObjectFormatback to summary
public JsonObjectFormatVisitor expectObjectFormat(JavaType type)

Implements tools.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper.expectObjectFormat.

Annotations
@Override
expectStringFormatback to summary
public JsonStringFormatVisitor expectStringFormat(JavaType type)

Implements tools.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper.expectStringFormat.

Annotations
@Override
getAvroSchemaback to summary
public Schema getAvroSchema()
getContextback to summary
public SerializationContext getContext()

Implements tools.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWithSerializationContext.getContext.

Annotations
@Override
getSchemasback to summary
protected DefinedSchemas getSchemas()
isLogicalTypesEnabledback to summary
public boolean isLogicalTypesEnabled()
isWriteEnumAsStringEnabledback to summary
public boolean isWriteEnumAsStringEnabled()
setContextback to summary
public void setContext(SerializationContext ctxt)

Implements tools.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWithSerializationContext.setContext.

Annotations
@Override