Package com.google.protobuf
Class Type
- All Implemented Interfaces:
MessageLite
,MessageLiteOrBuilder
,TypeOrBuilder
A protocol buffer message type.Protobuf type
google.protobuf.Type
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageLite
GeneratedMessageLite.DefaultInstanceBasedParser<T extends GeneratedMessageLite<T,
?>>, GeneratedMessageLite.ExtendableBuilder<MessageType extends GeneratedMessageLite.ExtendableMessage<MessageType, BuilderType>, BuilderType extends GeneratedMessageLite.ExtendableBuilder<MessageType, BuilderType>>, GeneratedMessageLite.ExtendableMessage<MessageType extends GeneratedMessageLite.ExtendableMessage<MessageType, BuilderType>, BuilderType extends GeneratedMessageLite.ExtendableBuilder<MessageType, BuilderType>>, GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType extends GeneratedMessageLite.ExtendableMessage<MessageType, BuilderType>, BuilderType extends GeneratedMessageLite.ExtendableBuilder<MessageType, BuilderType>>, GeneratedMessageLite.ExtensionDescriptor, GeneratedMessageLite.GeneratedExtension<ContainingType extends MessageLite, Type>, GeneratedMessageLite.MethodToInvoke, GeneratedMessageLite.SerializedForm Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
AbstractMessageLite.InternalOneOfEnum
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private static final Type
private String
static final int
private Internal.ProtobufList
<Field> static final int
private String
static final int
private Internal.ProtobufList
<String> static final int
private Internal.ProtobufList
<Option> static final int
static final int
private SourceContext
private int
static final int
Fields inherited from class com.google.protobuf.GeneratedMessageLite
UNINITIALIZED_HASH_CODE, UNINITIALIZED_SERIALIZED_SIZE, unknownFields
Fields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addAllFields
(Iterable<? extends Field> values) The list of fields.private void
addAllOneofs
(Iterable<String> values) The list of types appearing in `oneof` definitions in this type.private void
addAllOptions
(Iterable<? extends Option> values) The protocol buffer options.private void
The list of fields.private void
The list of fields.private void
The list of types appearing in `oneof` definitions in this type.private void
addOneofsBytes
(ByteString value) The list of types appearing in `oneof` definitions in this type.private void
addOptions
(int index, Option value) The protocol buffer options.private void
addOptions
(Option value) The protocol buffer options.private void
The source edition string, only valid when syntax is SYNTAX_EDITIONS.private void
The list of fields.private void
The fully qualified message name.private void
The list of types appearing in `oneof` definitions in this type.private void
The protocol buffer options.private void
The source context.private void
The source syntax.protected final Object
dynamicMethod
(GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) A method that implements different types of operations described inGeneratedMessageLite.MethodToInvoke
.private void
private void
private void
static Type
The source edition string, only valid when syntax is SYNTAX_EDITIONS.The source edition string, only valid when syntax is SYNTAX_EDITIONS.getFields
(int index) The list of fields.int
The list of fields.The list of fields.getFieldsOrBuilder
(int index) The list of fields.List
<? extends FieldOrBuilder> The list of fields.getName()
The fully qualified message name.The fully qualified message name.getOneofs
(int index) The list of types appearing in `oneof` definitions in this type.getOneofsBytes
(int index) The list of types appearing in `oneof` definitions in this type.int
The list of types appearing in `oneof` definitions in this type.The list of types appearing in `oneof` definitions in this type.getOptions
(int index) The protocol buffer options.int
The protocol buffer options.The protocol buffer options.getOptionsOrBuilder
(int index) The protocol buffer options.List
<? extends OptionOrBuilder> The protocol buffer options.The source context.The source syntax.int
The source syntax.boolean
The source context.private void
mergeSourceContext
(SourceContext value) The source context.static Type.Builder
static Type.Builder
newBuilder
(Type prototype) static Type
parseDelimitedFrom
(InputStream input) static Type
parseDelimitedFrom
(InputStream input, ExtensionRegistryLite extensionRegistry) static Type
parseFrom
(byte[] data) static Type
parseFrom
(byte[] data, ExtensionRegistryLite extensionRegistry) static Type
parseFrom
(ByteString data) static Type
parseFrom
(ByteString data, ExtensionRegistryLite extensionRegistry) static Type
parseFrom
(CodedInputStream input) static Type
parseFrom
(CodedInputStream input, ExtensionRegistryLite extensionRegistry) static Type
parseFrom
(InputStream input) static Type
parseFrom
(InputStream input, ExtensionRegistryLite extensionRegistry) static Type
parseFrom
(ByteBuffer data) static Type
parseFrom
(ByteBuffer data, ExtensionRegistryLite extensionRegistry) parser()
private void
removeFields
(int index) The list of fields.private void
removeOptions
(int index) The protocol buffer options.private void
setEdition
(String value) The source edition string, only valid when syntax is SYNTAX_EDITIONS.private void
setEditionBytes
(ByteString value) The source edition string, only valid when syntax is SYNTAX_EDITIONS.private void
The list of fields.private void
The fully qualified message name.private void
setNameBytes
(ByteString value) The fully qualified message name.private void
The list of types appearing in `oneof` definitions in this type.private void
setOptions
(int index, Option value) The protocol buffer options.private void
setSourceContext
(SourceContext value) The source context.private void
The source syntax.private void
setSyntaxValue
(int value) The source syntax.Methods inherited from class com.google.protobuf.GeneratedMessageLite
buildMessageInfo, clearMemoizedHashCode, clearMemoizedSerializedSize, computeHashCode, createBuilder, createBuilder, dynamicMethod, dynamicMethod, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, emptyProtobufList, equals, getDefaultInstance, getDefaultInstanceForType, getMemoizedHashCode, getMemoizedSerializedSize, getMethodOrDie, getParserForType, getSerializedSize, getSerializedSize, hashCode, hashCodeIsNotMemoized, invokeOrDie, isInitialized, isInitialized, isMutable, makeImmutable, markImmutable, mergeLengthDelimitedField, mergeUnknownFields, mergeVarintField, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBuilderForType, newMessageInfo, newMutableInstance, newRepeatedGeneratedExtension, newSingularGeneratedExtension, parseDelimitedFrom, parseDelimitedFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parsePartialFrom, parsePartialFrom, parseUnknownField, registerDefaultInstance, setMemoizedHashCode, setMemoizedSerializedSize, toBuilder, toString, writeTo
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, newUninitializedMessageException, toByteArray, toByteString, writeDelimitedTo, writeTo
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Field Details
-
bitField0_
private int bitField0_ -
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER- See Also:
-
name_
-
FIELDS_FIELD_NUMBER
public static final int FIELDS_FIELD_NUMBER- See Also:
-
fields_
-
ONEOFS_FIELD_NUMBER
public static final int ONEOFS_FIELD_NUMBER- See Also:
-
oneofs_
-
OPTIONS_FIELD_NUMBER
public static final int OPTIONS_FIELD_NUMBER- See Also:
-
options_
-
SOURCE_CONTEXT_FIELD_NUMBER
public static final int SOURCE_CONTEXT_FIELD_NUMBER- See Also:
-
sourceContext_
-
SYNTAX_FIELD_NUMBER
public static final int SYNTAX_FIELD_NUMBER- See Also:
-
syntax_
private int syntax_ -
EDITION_FIELD_NUMBER
public static final int EDITION_FIELD_NUMBER- See Also:
-
edition_
-
DEFAULT_INSTANCE
-
PARSER
-
-
Constructor Details
-
Type
private Type()
-
-
Method Details
-
getName
The fully qualified message name.
string name = 1;
- Specified by:
getName
in interfaceTypeOrBuilder
- Returns:
- The name.
-
getNameBytes
The fully qualified message name.
string name = 1;
- Specified by:
getNameBytes
in interfaceTypeOrBuilder
- Returns:
- The bytes for name.
-
setName
The fully qualified message name.
string name = 1;
- Parameters:
value
- The name to set.
-
clearName
private void clearName()The fully qualified message name.
string name = 1;
-
setNameBytes
The fully qualified message name.
string name = 1;
- Parameters:
value
- The bytes for name to set.
-
getFieldsList
The list of fields.
repeated .google.protobuf.Field fields = 2;
- Specified by:
getFieldsList
in interfaceTypeOrBuilder
-
getFieldsOrBuilderList
The list of fields.
repeated .google.protobuf.Field fields = 2;
-
getFieldsCount
public int getFieldsCount()The list of fields.
repeated .google.protobuf.Field fields = 2;
- Specified by:
getFieldsCount
in interfaceTypeOrBuilder
-
getFields
The list of fields.
repeated .google.protobuf.Field fields = 2;
- Specified by:
getFields
in interfaceTypeOrBuilder
-
getFieldsOrBuilder
The list of fields.
repeated .google.protobuf.Field fields = 2;
-
ensureFieldsIsMutable
private void ensureFieldsIsMutable() -
setFields
The list of fields.
repeated .google.protobuf.Field fields = 2;
-
addFields
The list of fields.
repeated .google.protobuf.Field fields = 2;
-
addFields
The list of fields.
repeated .google.protobuf.Field fields = 2;
-
addAllFields
The list of fields.
repeated .google.protobuf.Field fields = 2;
-
clearFields
private void clearFields()The list of fields.
repeated .google.protobuf.Field fields = 2;
-
removeFields
private void removeFields(int index) The list of fields.
repeated .google.protobuf.Field fields = 2;
-
getOneofsList
The list of types appearing in `oneof` definitions in this type.
repeated string oneofs = 3;
- Specified by:
getOneofsList
in interfaceTypeOrBuilder
- Returns:
- A list containing the oneofs.
-
getOneofsCount
public int getOneofsCount()The list of types appearing in `oneof` definitions in this type.
repeated string oneofs = 3;
- Specified by:
getOneofsCount
in interfaceTypeOrBuilder
- Returns:
- The count of oneofs.
-
getOneofs
The list of types appearing in `oneof` definitions in this type.
repeated string oneofs = 3;
- Specified by:
getOneofs
in interfaceTypeOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The oneofs at the given index.
-
getOneofsBytes
The list of types appearing in `oneof` definitions in this type.
repeated string oneofs = 3;
- Specified by:
getOneofsBytes
in interfaceTypeOrBuilder
- Parameters:
index
- The index of the value to return.- Returns:
- The bytes of the oneofs at the given index.
-
ensureOneofsIsMutable
private void ensureOneofsIsMutable() -
setOneofs
The list of types appearing in `oneof` definitions in this type.
repeated string oneofs = 3;
- Parameters:
index
- The index to set the value at.value
- The oneofs to set.
-
addOneofs
The list of types appearing in `oneof` definitions in this type.
repeated string oneofs = 3;
- Parameters:
value
- The oneofs to add.
-
addAllOneofs
The list of types appearing in `oneof` definitions in this type.
repeated string oneofs = 3;
- Parameters:
values
- The oneofs to add.
-
clearOneofs
private void clearOneofs()The list of types appearing in `oneof` definitions in this type.
repeated string oneofs = 3;
-
addOneofsBytes
The list of types appearing in `oneof` definitions in this type.
repeated string oneofs = 3;
- Parameters:
value
- The bytes of the oneofs to add.
-
getOptionsList
The protocol buffer options.
repeated .google.protobuf.Option options = 4;
- Specified by:
getOptionsList
in interfaceTypeOrBuilder
-
getOptionsOrBuilderList
The protocol buffer options.
repeated .google.protobuf.Option options = 4;
-
getOptionsCount
public int getOptionsCount()The protocol buffer options.
repeated .google.protobuf.Option options = 4;
- Specified by:
getOptionsCount
in interfaceTypeOrBuilder
-
getOptions
The protocol buffer options.
repeated .google.protobuf.Option options = 4;
- Specified by:
getOptions
in interfaceTypeOrBuilder
-
getOptionsOrBuilder
The protocol buffer options.
repeated .google.protobuf.Option options = 4;
-
ensureOptionsIsMutable
private void ensureOptionsIsMutable() -
setOptions
The protocol buffer options.
repeated .google.protobuf.Option options = 4;
-
addOptions
The protocol buffer options.
repeated .google.protobuf.Option options = 4;
-
addOptions
The protocol buffer options.
repeated .google.protobuf.Option options = 4;
-
addAllOptions
The protocol buffer options.
repeated .google.protobuf.Option options = 4;
-
clearOptions
private void clearOptions()The protocol buffer options.
repeated .google.protobuf.Option options = 4;
-
removeOptions
private void removeOptions(int index) The protocol buffer options.
repeated .google.protobuf.Option options = 4;
-
hasSourceContext
public boolean hasSourceContext()The source context.
.google.protobuf.SourceContext source_context = 5;
- Specified by:
hasSourceContext
in interfaceTypeOrBuilder
- Returns:
- Whether the sourceContext field is set.
-
getSourceContext
The source context.
.google.protobuf.SourceContext source_context = 5;
- Specified by:
getSourceContext
in interfaceTypeOrBuilder
- Returns:
- The sourceContext.
-
setSourceContext
The source context.
.google.protobuf.SourceContext source_context = 5;
-
mergeSourceContext
The source context.
.google.protobuf.SourceContext source_context = 5;
-
clearSourceContext
private void clearSourceContext()The source context.
.google.protobuf.SourceContext source_context = 5;
-
getSyntaxValue
public int getSyntaxValue()The source syntax.
.google.protobuf.Syntax syntax = 6;
- Specified by:
getSyntaxValue
in interfaceTypeOrBuilder
- Returns:
- The enum numeric value on the wire for syntax.
-
getSyntax
The source syntax.
.google.protobuf.Syntax syntax = 6;
- Specified by:
getSyntax
in interfaceTypeOrBuilder
- Returns:
- The syntax.
-
setSyntaxValue
private void setSyntaxValue(int value) The source syntax.
.google.protobuf.Syntax syntax = 6;
- Parameters:
value
- The enum numeric value on the wire for syntax to set.
-
setSyntax
The source syntax.
.google.protobuf.Syntax syntax = 6;
- Parameters:
value
- The syntax to set.
-
clearSyntax
private void clearSyntax()The source syntax.
.google.protobuf.Syntax syntax = 6;
-
getEdition
The source edition string, only valid when syntax is SYNTAX_EDITIONS.
string edition = 7;
- Specified by:
getEdition
in interfaceTypeOrBuilder
- Returns:
- The edition.
-
getEditionBytes
The source edition string, only valid when syntax is SYNTAX_EDITIONS.
string edition = 7;
- Specified by:
getEditionBytes
in interfaceTypeOrBuilder
- Returns:
- The bytes for edition.
-
setEdition
The source edition string, only valid when syntax is SYNTAX_EDITIONS.
string edition = 7;
- Parameters:
value
- The edition to set.
-
clearEdition
private void clearEdition()The source edition string, only valid when syntax is SYNTAX_EDITIONS.
string edition = 7;
-
setEditionBytes
The source edition string, only valid when syntax is SYNTAX_EDITIONS.
string edition = 7;
- Parameters:
value
- The bytes for edition to set.
-
parseFrom
- Throws:
InvalidProtocolBufferException
-
parseFrom
public static Type parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException - Throws:
InvalidProtocolBufferException
-
parseFrom
- Throws:
InvalidProtocolBufferException
-
parseFrom
public static Type parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException - Throws:
InvalidProtocolBufferException
-
parseFrom
- Throws:
InvalidProtocolBufferException
-
parseFrom
public static Type parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException - Throws:
InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Type parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static Type parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Type parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilder
-
newBuilder
-
dynamicMethod
protected final Object dynamicMethod(GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) Description copied from class:GeneratedMessageLite
A method that implements different types of operations described inGeneratedMessageLite.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_INSTANCE
returns a new instance of the protocol buffer that has not yet been made immutable. SeeMAKE_IMMUTABLE
.IS_INITIALIZED
returnsnull
for false and the default instance for true. It doesn't use or modify any memoized value.GET_MEMOIZED_IS_INITIALIZED
returns the memoizedisInitialized
byte value.SET_MEMOIZED_IS_INITIALIZED
sets the memoizedisInitialized
byte value to 1 if the first parameter is not null, or to 0 if the first parameter is null.NEW_BUILDER
returns aBuilderType
instance.
For use by generated code only.
- Specified by:
dynamicMethod
in classGeneratedMessageLite<Type,
Type.Builder>
-
getDefaultInstance
-
parser
-