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`

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

      `_provider`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ProtobufSchemaGenerator()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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, expectArrayFormat, expectBooleanFormat, expectIntegerFormat, expectMapFormat, expectNullFormat, expectNumberFormat`

    - ### 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`

    - #### 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`

Copyright © 2016 FasterXML. All rights reserved.