java.lang.Object
tools.jackson.dataformat.protobuf.schema.ProtobufField
All Implemented Interfaces:
Comparable<ProtobufField>

public class ProtobufField extends Object implements Comparable<ProtobufField>
  • Field Details

    • id

      public final int id
      Numeric tag, unshifted
    • typedTag

      public final int typedTag
      Combination of numeric tag and 3-bit wire type.
    • name

      public final String name
      Name of field in protoc definition
    • type

      public final FieldType type
    • wireType

      public final int wireType
      3-bit id used on determining details of how values are serialized.
    • required

      public final boolean required
    • repeated

      public final boolean repeated
    • packed

      public final boolean packed
    • deprecated

      public final boolean deprecated
    • usesZigZag

      public final boolean usesZigZag
    • messageType

      protected ProtobufMessage messageType
      For main type of FieldType.MESSAGE, reference to actual message type definition.
    • enumValues

      protected final EnumLookup enumValues
      For fields of type FieldType.ENUM, mapping from names to ids.
    • next

      public ProtobufField next
      Link to next field within message definition; used for efficient traversal. Due to inverse construction order need to be assigned after construction; but functionally immutable.
    • isObject

      public final boolean isObject
    • isStdEnum

      public final boolean isStdEnum
  • Constructor Details

    • ProtobufField

      public ProtobufField(com.squareup.protoparser.FieldElement nativeField, FieldType type)
    • ProtobufField

      public ProtobufField(com.squareup.protoparser.FieldElement nativeField, ProtobufMessage msg)
    • ProtobufField

      public ProtobufField(com.squareup.protoparser.FieldElement nativeField, ProtobufEnum et)
    • ProtobufField

      protected ProtobufField(com.squareup.protoparser.FieldElement nativeField, FieldType type, ProtobufMessage msg, ProtobufEnum et)
  • Method Details

    • unknownField

      public static ProtobufField unknownField()
    • assignMessageType

      public void assignMessageType(ProtobufMessage msgType)
    • assignNext

      public void assignNext(ProtobufField n)
    • getMessageType

      public final ProtobufMessage getMessageType()
    • nextOrThisIf

      public final ProtobufField nextOrThisIf(int idToMatch)
    • nextIf

      public final ProtobufField nextIf(String nameToMatch)
    • findEnumIndex

      public final int findEnumIndex(tools.jackson.core.SerializableString key)
    • findEnumIndex

      public final int findEnumIndex(String key)
    • findEnumByIndex

      public final String findEnumByIndex(int index)
    • getEnumValues

      public Collection<String> getEnumValues()
    • isArray

      public final boolean isArray()
    • isValidFor

      public final boolean isValidFor(int typeTag)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • compareTo

      public int compareTo(ProtobufField other)
      Specified by:
      compareTo in interface Comparable<ProtobufField>