com.fasterxml.jackson.dataformat.protobuf.schemagen

## Class ProtobufSchemaGenerator

- java.lang.Object
- - com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper.Base
  - - com.fasterxml.jackson.dataformat.protobuf.schemagen.ProtoBufSchemaVisitor
    - - com.fasterxml.jackson.dataformat.protobuf.schemagen.ProtobufSchemaGenerator

- All Implemented Interfaces:
    com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWithSerializerProvider, com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper, TypeElementBuilder

      public class ProtobufSchemaGenerator
      extends ProtoBufSchemaVisitor

  Class that can generate a `ProtobufSchema` for a given Java POJO, using definitions Jackson would use for serialization. An instance is typically given to `ObjectMapper.acceptJsonFormatVisitor(java.lang.Class<?>, com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper)` which will invoke necessary callbacks.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper

      `com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper.Base`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected HashSet<com.fasterxml.jackson.databind.JavaType>` | `_generated`
    `protected com.fasterxml.jackson.databind.JavaType` | `_rootType`

    - ### Fields inherited from class com.fasterxml.jackson.dataformat.protobuf.schemagen.ProtoBufSchemaVisitor

      `_builder, _definedTypeElementBuilders, _isNested, _simpleType`

    - ### Fields inherited from class com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper.Base

      `_provider`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ProtobufSchemaGenerator()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `com.fasterxml.jackson.databind.jsonFormatVisitors.JsonArrayFormatVisitor` | `expectArrayFormat(com.fasterxml.jackson.databind.JavaType convertedType)`
    `com.fasterxml.jackson.databind.jsonFormatVisitors.JsonBooleanFormatVisitor` | `expectBooleanFormat(com.fasterxml.jackson.databind.JavaType convertedType)`
    `com.fasterxml.jackson.databind.jsonFormatVisitors.JsonIntegerFormatVisitor` | `expectIntegerFormat(com.fasterxml.jackson.databind.JavaType type)`
    `com.fasterxml.jackson.databind.jsonFormatVisitors.JsonMapFormatVisitor` | `expectMapFormat(com.fasterxml.jackson.databind.JavaType mapType)`
    `com.fasterxml.jackson.databind.jsonFormatVisitors.JsonNumberFormatVisitor` | `expectNumberFormat(com.fasterxml.jackson.databind.JavaType convertedType)`
    `com.fasterxml.jackson.databind.jsonFormatVisitors.JsonObjectFormatVisitor` | `expectObjectFormat(com.fasterxml.jackson.databind.JavaType type)`
    `com.fasterxml.jackson.databind.jsonFormatVisitors.JsonStringFormatVisitor` | `expectStringFormat(com.fasterxml.jackson.databind.JavaType type)`
    `ProtobufSchema` | `getGeneratedSchema()`
    `ProtobufSchema` | `getGeneratedSchema(boolean appendDependencies)`

    - ### Methods inherited from class com.fasterxml.jackson.dataformat.protobuf.schemagen.ProtoBufSchemaVisitor

      `_throwUnsupported, _throwUnsupported, build, buildWithDependencies, expectAnyFormat, expectNullFormat, getSimpleType`

    - ### Methods inherited from class com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper.Base

      `getProvider, setProvider`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### _generated

          protected HashSet<com.fasterxml.jackson.databind.JavaType> _generated

    - #### _rootType

          protected com.fasterxml.jackson.databind.JavaType _rootType

  - ### Constructor Detail

    - #### ProtobufSchemaGenerator

          public ProtobufSchemaGenerator()

  - ### Method Detail

    - #### getGeneratedSchema

          public ProtobufSchema getGeneratedSchema()
                                            throws com.fasterxml.jackson.databind.JsonMappingException

      Throws:
        `com.fasterxml.jackson.databind.JsonMappingException`

    - #### getGeneratedSchema

          public ProtobufSchema getGeneratedSchema(boolean appendDependencies)
                                            throws com.fasterxml.jackson.databind.JsonMappingException

      Throws:
        `com.fasterxml.jackson.databind.JsonMappingException`

    - #### expectObjectFormat

          public com.fasterxml.jackson.databind.jsonFormatVisitors.JsonObjectFormatVisitor expectObjectFormat(com.fasterxml.jackson.databind.JavaType type)

      Specified by:
        `expectObjectFormat` in interface `com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper`
      Overrides:
        `expectObjectFormat` in class `ProtoBufSchemaVisitor`

    - #### expectMapFormat

          public com.fasterxml.jackson.databind.jsonFormatVisitors.JsonMapFormatVisitor expectMapFormat(com.fasterxml.jackson.databind.JavaType mapType)

      Specified by:
        `expectMapFormat` in interface `com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper`
      Overrides:
        `expectMapFormat` in class `ProtoBufSchemaVisitor`

    - #### expectArrayFormat

          public com.fasterxml.jackson.databind.jsonFormatVisitors.JsonArrayFormatVisitor expectArrayFormat(com.fasterxml.jackson.databind.JavaType convertedType)

      Specified by:
        `expectArrayFormat` in interface `com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper`
      Overrides:
        `expectArrayFormat` in class `ProtoBufSchemaVisitor`

    - #### expectStringFormat

          public com.fasterxml.jackson.databind.jsonFormatVisitors.JsonStringFormatVisitor expectStringFormat(com.fasterxml.jackson.databind.JavaType type)

      Specified by:
        `expectStringFormat` in interface `com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper`
      Overrides:
        `expectStringFormat` in class `ProtoBufSchemaVisitor`

    - #### expectNumberFormat

          public com.fasterxml.jackson.databind.jsonFormatVisitors.JsonNumberFormatVisitor expectNumberFormat(com.fasterxml.jackson.databind.JavaType convertedType)

      Specified by:
        `expectNumberFormat` in interface `com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper`
      Overrides:
        `expectNumberFormat` in class `ProtoBufSchemaVisitor`

    - #### expectIntegerFormat

          public com.fasterxml.jackson.databind.jsonFormatVisitors.JsonIntegerFormatVisitor expectIntegerFormat(com.fasterxml.jackson.databind.JavaType type)

      Specified by:
        `expectIntegerFormat` in interface `com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper`
      Overrides:
        `expectIntegerFormat` in class `ProtoBufSchemaVisitor`

    - #### expectBooleanFormat

          public com.fasterxml.jackson.databind.jsonFormatVisitors.JsonBooleanFormatVisitor expectBooleanFormat(com.fasterxml.jackson.databind.JavaType convertedType)

      Specified by:
        `expectBooleanFormat` in interface `com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper`
      Overrides:
        `expectBooleanFormat` in class `ProtoBufSchemaVisitor`

Copyright © 2019 FasterXML. All rights reserved.