Top Description Inners Fields Constructors Methods
com.google.protobuf

public final Class Field

extends GeneratedMessageV3
implements FieldOrBuilder
Class Inheritance
All Implemented Interfaces
com.google.protobuf.FieldOrBuilder, com.google.protobuf.MessageOrBuilder, com.google.protobuf.MessageLiteOrBuilder

A single field of a message type.
Protobuf type google.protobuf.Field

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
Field.Builder

A single field of a message type.
public static enum
Field.Cardinality

Whether a field is optional, required, or repeated.
public static enum
Field.Kind

Basic field types.

Field Summary

Modifier and TypeField and Description
private int
private int
public static final int
private static final Field
public static final int
private volatile Object
public static final int
private volatile Object
private int
public static final int
private byte
private volatile Object
public static final int
private int
public static final int
public static final int
private int
private List<Option>
public static final int
private boolean
public static final int
private static final Parser<Field>
private static final long
public static final int
private volatile Object
Inherited from com.google.protobuf.GeneratedMessageV3:
alwaysUseFieldBuildersunknownFields

Constructor Summary

AccessConstructor and Description
private
private
private
Field(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(final Object
object to be compared for equality with this message
obj
)

Overrides com.google.protobuf.AbstractMessage.equals.

Implements com.google.protobuf.Message.equals.

Compares the specified object with this message for equality.
public Field.Cardinality
public int
public static Field
public Field
public String
getDefaultValue()

Implements com.google.protobuf.FieldOrBuilder.getDefaultValue.

The string value of the default value of this field.
public ByteString
getDefaultValueBytes()

Implements com.google.protobuf.FieldOrBuilder.getDefaultValueBytes.

The string value of the default value of this field.
public static final Descriptors.Descriptor
public String
public ByteString
public Field.Kind
public int
public String
public ByteString
public int
public int
getOneofIndex()

Implements com.google.protobuf.FieldOrBuilder.getOneofIndex.

The index of the field type in `Type.oneofs`, for message or enumeration
types.
public Option
getOptions(int index)

Implements com.google.protobuf.FieldOrBuilder.getOptions.

The protocol buffer options.
public int
getOptionsCount()

Implements com.google.protobuf.FieldOrBuilder.getOptionsCount.

The protocol buffer options.
public List<Option>
getOptionsList()

Implements com.google.protobuf.FieldOrBuilder.getOptionsList.

The protocol buffer options.
public OptionOrBuilder
getOptionsOrBuilder(int index)

Implements com.google.protobuf.FieldOrBuilder.getOptionsOrBuilder.

The protocol buffer options.
public List<? extends OptionOrBuilder>
public boolean
getPacked()

Implements com.google.protobuf.FieldOrBuilder.getPacked.

Whether to use alternative packed wire representation.
public Parser<Field>
public int
getSerializedSize()

Overrides com.google.protobuf.GeneratedMessageV3.getSerializedSize.

Implements com.google.protobuf.MessageLite.getSerializedSize.

Get the number of bytes required to encode this message.
public String
getTypeUrl()

Implements com.google.protobuf.FieldOrBuilder.getTypeUrl.

The field type URL, without the scheme, for message or enumeration
types.
public ByteString
getTypeUrlBytes()

Implements com.google.protobuf.FieldOrBuilder.getTypeUrlBytes.

The field type URL, without the scheme, for message or enumeration
types.
public final UnknownFieldSet
public int
hashCode()

Overrides com.google.protobuf.AbstractMessage.hashCode.

Implements com.google.protobuf.Message.hashCode.

Returns the hash code value for this message.
protected GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()

Implements abstract com.google.protobuf.GeneratedMessageV3.internalGetFieldAccessorTable.

Get the FieldAccessorTable for this type.
public final boolean
isInitialized()

Overrides com.google.protobuf.GeneratedMessageV3.isInitialized.

Implements com.google.protobuf.MessageLiteOrBuilder.isInitialized.

Returns true if all required fields in the message and all embedded messages are set, false otherwise.
public static Field.Builder
public static Field.Builder
newBuilder(Field prototype)

public Field.Builder
newBuilderForType()

Implements com.google.protobuf.Message.newBuilderForType, com.google.protobuf.MessageLite.newBuilderForType.

Constructs a new builder for a message of the same type as this message.
protected Field.Builder
newBuilderForType(GeneratedMessageV3.BuilderParent parent)

Implements abstract com.google.protobuf.GeneratedMessageV3.newBuilderForType.

TODO(xiaofeng): remove this together with GeneratedMessageV3.BuilderParent.
public static Field
public static Field
public static Field
public static Field
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Field
public static Field
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Field
parseFrom(byte[] data)

public static Field
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Field
public static Field
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Field
public static Field
public static Parser<Field>
public Field.Builder
toBuilder()

Implements com.google.protobuf.Message.toBuilder, com.google.protobuf.MessageLite.toBuilder.

Constructs a builder initialized with the current message.
public void
writeTo(CodedOutputStream output)

Overrides com.google.protobuf.GeneratedMessageV3.writeTo.

Implements com.google.protobuf.MessageLite.writeTo.

Serializes the message and writes it to output.
Inherited from com.google.protobuf.GeneratedMessageV3:
canUseUnsafecomputeStringSizecomputeStringSizeNoTagemptyBooleanListemptyDoubleListemptyFloatListemptyIntListemptyLongListenableAlwaysUseFieldBuildersForTestinggetAllFieldsgetAllFieldsRawgetDescriptorForTypegetFieldgetFieldRawgetOneofFieldDescriptorgetRepeatedFieldgetRepeatedFieldCounthasFieldhasOneofinternalGetMapFieldmakeExtensionsImmutablemutableCopymutableCopymutableCopymutableCopymutableCopynewBooleanListnewBuilderForTypenewDoubleListnewFloatListnewIntListnewLongListparseDelimitedWithIOExceptionparseDelimitedWithIOExceptionparseUnknownFieldparseUnknownFieldProto3parseWithIOExceptionparseWithIOExceptionparseWithIOExceptionparseWithIOExceptionserializeBooleanMapToserializeIntegerMapToserializeLongMapToserializeStringMapTowriteReplacewriteStringwriteStringNoTag