java.lang.Object
tools.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 Details

    • _name

      protected final String _name
    • _nativeTypes

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

      protected volatile String[] _messageNames
  • Constructor Details

    • NativeProtobufSchema

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

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

    • 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)