com.fasterxml.jackson.dataformat.protobuf.schema

## Class NativeProtobufSchema

- java.lang.Object
- - com.fasterxml.jackson.dataformat.protobuf.schema.NativeProtobufSchema

-     public class NativeProtobufSchema
      extends Object

  Helper class used for wrapping a "raw" protobuf schema (as read by "protoparser" library); and used as input for creating specific `ProtobufSchema` to use for reading/writing protobuf encoded content

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected String[]` | `_messageNames`
    `protected String` | `_name`
    `protected Collection<com.squareup.protoparser.TypeElement>` | `_nativeTypes`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `NativeProtobufSchema(com.squareup.protoparser.ProtoFile input)`
    `protected` | `NativeProtobufSchema(String name, Collection<com.squareup.protoparser.TypeElement> types)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected com.squareup.protoparser.MessageElement` | `_firstMessageType()`
    `protected com.squareup.protoparser.MessageElement` | `_messageType(String name)`
    `static NativeProtobufSchema` | `construct(com.squareup.protoparser.ProtoFile input)`
    `static NativeProtobufSchema` | `construct(String name, Collection<com.squareup.protoparser.TypeElement> types)`
    `ProtobufSchema` | `forFirstType()` Factory method for constructing Jackson-digestible schema using the first Message type defined in the underlying native protobuf schema.
    `ProtobufSchema` | `forType(String messageTypeName)` Factory method for constructing Jackson-digestible schema using specified Message type from native protobuf schema.
    `List<String>` | `getMessageNames()`
    `boolean` | `hasMessageType(String messageTypeName)` Method for checking whether specified message type is defined by the native schema
    `String` | `toString()`
    `String` | `toString(String name)`

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

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

- - ### Field Detail

    - #### _name

          protected final String _name

    - #### _nativeTypes

          protected final Collection<com.squareup.protoparser.TypeElement> _nativeTypes

    - #### _messageNames

          protected volatile String[] _messageNames

  - ### Constructor Detail

    - #### NativeProtobufSchema

          protected NativeProtobufSchema(com.squareup.protoparser.ProtoFile input)

    - #### NativeProtobufSchema

          protected NativeProtobufSchema(String name,
                                         Collection<com.squareup.protoparser.TypeElement> types)

  - ### Method Detail

    - #### construct

          public static NativeProtobufSchema construct(com.squareup.protoparser.ProtoFile input)

    - #### construct

          public static NativeProtobufSchema construct(String name,
                                                       Collection<com.squareup.protoparser.TypeElement> types)

    - #### hasMessageType

          public boolean hasMessageType(String messageTypeName)

      Method for checking whether specified message type is defined by the native schema

    - #### forType

          public ProtobufSchema forType(String messageTypeName)

      Factory method for constructing Jackson-digestible schema using specified Message type from native protobuf schema.

    - #### forFirstType

          public ProtobufSchema forFirstType()

      Factory method for constructing Jackson-digestible schema using the first Message type defined in the underlying native protobuf schema.

    - #### getMessageNames

          public List<String> getMessageNames()

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### toString

          public String toString(String name)

    - #### _firstMessageType

          protected com.squareup.protoparser.MessageElement _firstMessageType()

    - #### _messageType

          protected com.squareup.protoparser.MessageElement _messageType(String name)

Copyright © 2019 FasterXML. All rights reserved.