Class ProtobufField
java.lang.Object
tools.jackson.dataformat.protobuf.schema.ProtobufField
- All Implemented Interfaces:
Comparable<ProtobufField>
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal booleanprotected final EnumLookupFor fields of typeFieldType.ENUM, mapping from names to ids.final intNumeric tag, unshiftedfinal booleanfinal booleanprotected ProtobufMessageFor main type ofFieldType.MESSAGE, reference to actual message type definition.final StringName of field in protoc definitionLink to next field within message definition; used for efficient traversal.final booleanfinal booleanfinal booleanfinal FieldTypefinal intCombination of numeric tag and 3-bit wire type.final booleanfinal int3-bit id used on determining details of how values are serialized. -
Constructor Summary
ConstructorsModifierConstructorDescriptionProtobufField(com.squareup.protoparser.FieldElement nativeField, FieldType type) protectedProtobufField(com.squareup.protoparser.FieldElement nativeField, FieldType type, ProtobufMessage msg, ProtobufEnum et) ProtobufField(com.squareup.protoparser.FieldElement nativeField, ProtobufEnum et) ProtobufField(com.squareup.protoparser.FieldElement nativeField, ProtobufMessage msg) -
Method Summary
Modifier and TypeMethodDescriptionvoidassignMessageType(ProtobufMessage msgType) voidintcompareTo(ProtobufField other) final StringfindEnumByIndex(int index) final intfindEnumIndex(String key) final intfindEnumIndex(tools.jackson.core.SerializableString key) final ProtobufMessagefinal booleanisArray()final booleanisValidFor(int typeTag) final ProtobufFieldfinal ProtobufFieldnextOrThisIf(int idToMatch) toString()static ProtobufField
-
Field Details
-
id
public final int idNumeric tag, unshifted -
typedTag
public final int typedTagCombination of numeric tag and 3-bit wire type. -
name
Name of field in protoc definition -
type
-
wireType
public final int wireType3-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
For main type ofFieldType.MESSAGE, reference to actual message type definition. -
enumValues
For fields of typeFieldType.ENUM, mapping from names to ids. -
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
-
ProtobufField
-
ProtobufField
-
ProtobufField
protected ProtobufField(com.squareup.protoparser.FieldElement nativeField, FieldType type, ProtobufMessage msg, ProtobufEnum et)
-
-
Method Details
-
unknownField
-
assignMessageType
-
assignNext
-
getMessageType
-
nextOrThisIf
-
nextIf
-
findEnumIndex
public final int findEnumIndex(tools.jackson.core.SerializableString key) -
findEnumIndex
-
findEnumByIndex
-
getEnumValues
-
isArray
public final boolean isArray() -
isValidFor
public final boolean isValidFor(int typeTag) -
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<ProtobufField>
-