Top Description Fields Constructors Methods
tools.jackson.dataformat.protobuf.schemagen

public Class ProtobufSchemaGenerator

extends ProtoBufSchemaVisitor
Class Inheritance
Imports
java.util.*, com.squareup.protoparser.TypeElement, tools.jackson.databind.JavaType, tools.jackson.databind.jsonFormatVisitors.*, tools.jackson.dataformat.protobuf.schema.NativeProtobufSchema, .ProtobufSchema

Class that can generate a ProtobufSchema for a given Java POJO, using definitions Jackson would use for serialization. An instance is typically given to tools.jackson.databind.ObjectMapper#acceptJsonFormatVisitor which will invoke necessary callbacks.

Field Summary

Modifier and TypeField and Description
protected HashSet<JavaType>
protected JavaType
Inherited from tools.jackson.dataformat.protobuf.schemagen.ProtoBufSchemaVisitor:
_builder_definedTypeElementBuilders_isNested_simpleType

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public JsonArrayFormatVisitor
public JsonBooleanFormatVisitor
public JsonIntegerFormatVisitor
public JsonMapFormatVisitor
public JsonNumberFormatVisitor
public JsonObjectFormatVisitor
public JsonStringFormatVisitor
public ProtobufSchema
public ProtobufSchema
getGeneratedSchema(boolean appendDependencies)

Inherited from tools.jackson.dataformat.protobuf.schemagen.ProtoBufSchemaVisitor:
_throwUnsupported_throwUnsupportedbuildbuildWithDependenciesexpectAnyFormatexpectNullFormatgetSimpleType

Field Detail

_generatedback to summary
protected HashSet<JavaType> _generated
_rootTypeback to summary
protected JavaType _rootType

Constructor Detail

ProtobufSchemaGeneratorback to summary
public ProtobufSchemaGenerator()

Method Detail

expectArrayFormatback to summary
public JsonArrayFormatVisitor expectArrayFormat(JavaType convertedType)

Overrides tools.jackson.dataformat.protobuf.schemagen.ProtoBufSchemaVisitor.expectArrayFormat.

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

Annotations
@Override
expectBooleanFormatback to summary
public JsonBooleanFormatVisitor expectBooleanFormat(JavaType convertedType)

Overrides tools.jackson.dataformat.protobuf.schemagen.ProtoBufSchemaVisitor.expectBooleanFormat.

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

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

Overrides tools.jackson.dataformat.protobuf.schemagen.ProtoBufSchemaVisitor.expectIntegerFormat.

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

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

Overrides tools.jackson.dataformat.protobuf.schemagen.ProtoBufSchemaVisitor.expectMapFormat.

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
expectNumberFormatback to summary
public JsonNumberFormatVisitor expectNumberFormat(JavaType convertedType)

Overrides tools.jackson.dataformat.protobuf.schemagen.ProtoBufSchemaVisitor.expectNumberFormat.

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

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

Overrides tools.jackson.dataformat.protobuf.schemagen.ProtoBufSchemaVisitor.expectObjectFormat.

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

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

Overrides tools.jackson.dataformat.protobuf.schemagen.ProtoBufSchemaVisitor.expectStringFormat.

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

Annotations
@Override
getGeneratedSchemaback to summary
public ProtobufSchema getGeneratedSchema()
getGeneratedSchemaback to summary
public ProtobufSchema getGeneratedSchema(boolean appendDependencies)