com.fasterxml.jackson.dataformat.protobuf.schema

## Class ProtobufMessage

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

-     public class ProtobufMessage
      extends Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ProtobufField[]` | `_fields` Array that contains actual fields, in declaration order.
    `protected ProtobufField[]` | `_fieldsById` Arrays of fields indexed by id (offset by `_idOffset`), if fields ids are in contiguous (enough) range.
    `protected FieldLookup` | `_fieldsByName`
    `protected ProtobufField` | `_firstField`
    `protected int` | `_idOffset`
    `protected String` | `_name`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ProtobufMessage(String name, ProtobufField[] fields)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ProtobufMessage` | `bogusMessage(String desc)`
    `ProtobufField` | `field(int id)`
    `ProtobufField` | `field(com.fasterxml.jackson.core.SerializableString name)`
    `ProtobufField` | `field(String name)`
    `Iterable<ProtobufField>` | `fields()`
    `String` | `fieldsAsString()`
    `ProtobufField` | `firstField()`
    `ProtobufField` | `firstIf(String name)`
    `int` | `getFieldCount()`
    `String` | `getName()`
    `void` | `init(ProtobufField first)` Method called right after finishing actual construction of this message definition.

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

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

- - ### Field Detail

    - #### _name

          protected final String _name

    - #### _fields

          protected final ProtobufField[] _fields

      Array that contains actual fields, in declaration order. Note that while array is assigned in constructor, the contents may be lazily added within, but they must be completed before `init(ProtobufField)` is called.

    - #### _fieldsByName

          protected FieldLookup _fieldsByName

    - #### _fieldsById

          protected ProtobufField[] _fieldsById

      Arrays of fields indexed by id (offset by `_idOffset`), if fields ids are in contiguous (enough) range.

    - #### _firstField

          protected ProtobufField _firstField

    - #### _idOffset

          protected int _idOffset

  - ### Constructor Detail

    - #### ProtobufMessage

          public ProtobufMessage(String name,
                         ProtobufField[] fields)

  - ### Method Detail

    - #### init

          public void init(ProtobufField first)

      Method called right after finishing actual construction of this message definition. Needed because assignment to fields is dynamic, and setup is NOT complete when constructor exits.

    - #### bogusMessage

          public static ProtobufMessage bogusMessage(String desc)

    - #### firstField

          public ProtobufField firstField()

    - #### firstIf

          public ProtobufField firstIf(String name)

    - #### getFieldCount

          public int getFieldCount()

    - #### getName

          public String getName()

    - #### field

          public ProtobufField field(String name)

    - #### field

          public ProtobufField field(int id)

    - #### field

          public ProtobufField field(com.fasterxml.jackson.core.SerializableString name)

    - #### fieldsAsString

          public String fieldsAsString()

    - #### fields

          public Iterable<ProtobufField> fields()

Copyright © 2017 FasterXML. All rights reserved.