public
final
class
Field
extends
GeneratedMessageLite<Field
,
Field
.
Builder
>
implements
FieldOrBuilder
A single field of a message type.
Protobuf type google.protobuf.Field
Implements
FieldOrBuilderStatic Fields
CARDINALITY_FIELD_NUMBER
public
static
final
int
CARDINALITY_FIELD_NUMBER
DEFAULT_VALUE_FIELD_NUMBER
public
static
final
int
DEFAULT_VALUE_FIELD_NUMBER
JSON_NAME_FIELD_NUMBER
public
static
final
int
JSON_NAME_FIELD_NUMBER
KIND_FIELD_NUMBER
public
static
final
int
KIND_FIELD_NUMBER
NAME_FIELD_NUMBER
public
static
final
int
NAME_FIELD_NUMBER
NUMBER_FIELD_NUMBER
public
static
final
int
NUMBER_FIELD_NUMBER
ONEOF_INDEX_FIELD_NUMBER
public
static
final
int
ONEOF_INDEX_FIELD_NUMBER
OPTIONS_FIELD_NUMBER
public
static
final
int
OPTIONS_FIELD_NUMBER
PACKED_FIELD_NUMBER
public
static
final
int
PACKED_FIELD_NUMBER
TYPE_URL_FIELD_NUMBER
public
static
final
int
TYPE_URL_FIELD_NUMBER
Static Methods
getDefaultInstance()
public
static
Field
getDefaultInstance
()
newBuilder()
public
static
Field
.
Builder
newBuilder
()
newBuilder(Field prototype)
public
static
Field
.
Builder
newBuilder
(
Field
prototype
)
parseDelimitedFrom(InputStream input)
public
static
Field
parseDelimitedFrom
(
InputStream
input
)
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public
static
Field
parseDelimitedFrom
(
InputStream
input
,
ExtensionRegistryLite
extensionRegistry
)
parseFrom(byte[] data)
public
static
Field
parseFrom
(
byte
[]
data
)
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public
static
Field
parseFrom
(
byte
[]
data
,
ExtensionRegistryLite
extensionRegistry
)
parseFrom(ByteString data)
public
static
Field
parseFrom
(
ByteString
data
)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public
static
Field
parseFrom
(
ByteString
data
,
ExtensionRegistryLite
extensionRegistry
)
parseFrom(CodedInputStream input)
public
static
Field
parseFrom
(
CodedInputStream
input
)
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public
static
Field
parseFrom
(
CodedInputStream
input
,
ExtensionRegistryLite
extensionRegistry
)
parseFrom(InputStream input)
public
static
Field
parseFrom
(
InputStream
input
)
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public
static
Field
parseFrom
(
InputStream
input
,
ExtensionRegistryLite
extensionRegistry
)
parseFrom(ByteBuffer data)
public
static
Field
parseFrom
(
ByteBuffer
data
)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public
static
Field
parseFrom
(
ByteBuffer
data
,
ExtensionRegistryLite
extensionRegistry
)
parser()
public
static
Parser<Field>
parser
()
Methods
dynamicMethod(GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1)
protected
final
Object
dynamicMethod
(
GeneratedMessageLite
.
MethodToInvoke
method
,
Object
arg0
,
Object
arg1
)
A method that implements different types of operations described in MethodToInvoke . These different kinds of operations are required to implement message-level operations for builders in the runtime. This method bundles those operations to reduce the generated methods count.
-
NEW_INSTANCEreturns a new instance of the protocol buffer that has not yet been made immutable. SeeMAKE_IMMUTABLE. -
IS_INITIALIZEDreturnsnullfor false and the default instance for true. It doesn't use or modify any memoized value. -
GET_MEMOIZED_IS_INITIALIZEDreturns the memoizedisInitializedbyte value. -
SET_MEMOIZED_IS_INITIALIZEDsets the memoizedisInitializedbyte value to 1 if the first parameter is not null, or to 0 if the first parameter is null. -
NEW_BUILDERreturns aBuilderTypeinstance.
This method, plus the implementation of the Builder, enables the Builder class to be proguarded away entirely on Android.
For use by generated code only.
getCardinality()
public
Field
.
Cardinality
getCardinality
()
The field cardinality.
.google.protobuf.Field.Cardinality cardinality = 2;
getCardinalityValue()
public
int
getCardinalityValue
()
The field cardinality.
.google.protobuf.Field.Cardinality cardinality = 2;
getDefaultValue()
public
String
getDefaultValue
()
The string value of the default value of this field. Proto2 syntax only.
string default_value = 11;
getDefaultValueBytes()
public
ByteString
getDefaultValueBytes
()
The string value of the default value of this field. Proto2 syntax only.
string default_value = 11;
getJsonName()
public
String
getJsonName
()
The field JSON name.
string json_name = 10;
getJsonNameBytes()
public
ByteString
getJsonNameBytes
()
The field JSON name.
string json_name = 10;
getKind()
public
Field
.
Kind
getKind
()
The field type.
.google.protobuf.Field.Kind kind = 1;
getKindValue()
public
int
getKindValue
()
The field type.
.google.protobuf.Field.Kind kind = 1;
getName()
public
String
getName
()
The field name.
string name = 4;
getNameBytes()
public
ByteString
getNameBytes
()
The field name.
string name = 4;
getNumber()
public
int
getNumber
()
The field number.
int32 number = 3;
getOneofIndex()
public
int
getOneofIndex
()
The index of the field type in Type.oneofs
, for message or enumeration
types. The first type has index 1; zero means the type is not in the list.
int32 oneof_index = 7;
getOptions(int index)
public
Option
getOptions
(
int
index
)
The protocol buffer options.
repeated .google.protobuf.Option options = 9;
getOptionsCount()
public
int
getOptionsCount
()
The protocol buffer options.
repeated .google.protobuf.Option options = 9;
getOptionsList()
public
List<Option>
getOptionsList
()
The protocol buffer options.
repeated .google.protobuf.Option options = 9;
getOptionsOrBuilder(int index)
public
OptionOrBuilder
getOptionsOrBuilder
(
int
index
)
The protocol buffer options.
repeated .google.protobuf.Option options = 9;
getOptionsOrBuilderList()
public
List
< ?
extends
OptionOrBuilder
>
getOptionsOrBuilderList
()
The protocol buffer options.
repeated .google.protobuf.Option options = 9;
getPacked()
public
boolean
getPacked
()
Whether to use alternative packed wire representation.
bool packed = 8;
getTypeUrl()
public
String
getTypeUrl
()
The field type URL, without the scheme, for message or enumeration
types. Example: "type.googleapis.com/google.protobuf.Timestamp"
.
string type_url = 6;
getTypeUrlBytes()
public
ByteString
getTypeUrlBytes
()
The field type URL, without the scheme, for message or enumeration
types. Example: "type.googleapis.com/google.protobuf.Timestamp"
.
string type_url = 6;

