Package com.google.protobuf
Class Type
java.lang.Object
com.google.protobuf.AbstractMessageLite<MessageType,BuilderType>
- 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 intprivate static final Typeprivate Stringstatic final intprivate Internal.ProtobufList<Field>static final intprivate Stringstatic final intprivate Internal.ProtobufList<String>static final intprivate Internal.ProtobufList<Option>static final intstatic final intprivate SourceContextprivate intstatic final intFields inherited from class com.google.protobuf.GeneratedMessageLite
UNINITIALIZED_HASH_CODE, UNINITIALIZED_SERIALIZED_SIZE, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddAllFields(Iterable<? extends Field> values) The list of fields.private voidaddAllOneofs(Iterable<String> values) The list of types appearing in `oneof` definitions in this type.private voidaddAllOptions(Iterable<? extends Option> values) The protocol buffer options.private voidThe list of fields.private voidThe list of fields.private voidThe list of types appearing in `oneof` definitions in this type.private voidaddOneofsBytes(ByteString value) The list of types appearing in `oneof` definitions in this type.private voidaddOptions(int index, Option value) The protocol buffer options.private voidaddOptions(Option value) The protocol buffer options.private voidThe source edition string, only valid when syntax is SYNTAX_EDITIONS.private voidThe list of fields.private voidThe fully qualified message name.private voidThe list of types appearing in `oneof` definitions in this type.private voidThe protocol buffer options.private voidThe source context.private voidThe source syntax.protected final ObjectdynamicMethod(GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) A method that implements different types of operations described inGeneratedMessageLite.MethodToInvoke.private voidprivate voidprivate voidstatic TypeThe 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.intThe 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.intThe 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.intThe 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.intThe source syntax.booleanThe source context.private voidmergeSourceContext(SourceContext value) The source context.static Type.Builderstatic Type.BuildernewBuilder(Type prototype) static TypeparseDelimitedFrom(InputStream input) static TypeparseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) static TypeparseFrom(byte[] data) static TypeparseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) static TypeparseFrom(ByteString data) static TypeparseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) static TypeparseFrom(CodedInputStream input) static TypeparseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) static TypeparseFrom(InputStream input) static TypeparseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) static TypeparseFrom(ByteBuffer data) static TypeparseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) parser()private voidremoveFields(int index) The list of fields.private voidremoveOptions(int index) The protocol buffer options.private voidsetEdition(String value) The source edition string, only valid when syntax is SYNTAX_EDITIONS.private voidsetEditionBytes(ByteString value) The source edition string, only valid when syntax is SYNTAX_EDITIONS.private voidThe list of fields.private voidThe fully qualified message name.private voidsetNameBytes(ByteString value) The fully qualified message name.private voidThe list of types appearing in `oneof` definitions in this type.private voidsetOptions(int index, Option value) The protocol buffer options.private voidsetSourceContext(SourceContext value) The source context.private voidThe source syntax.private voidsetSyntaxValue(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, writeToMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, newUninitializedMessageException, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:
getNamein interfaceTypeOrBuilder- Returns:
- The name.
-
getNameBytes
The fully qualified message name.
string name = 1;- Specified by:
getNameBytesin 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:
getFieldsListin 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:
getFieldsCountin interfaceTypeOrBuilder
-
getFields
The list of fields.
repeated .google.protobuf.Field fields = 2;- Specified by:
getFieldsin 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:
getOneofsListin 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:
getOneofsCountin interfaceTypeOrBuilder- Returns:
- The count of oneofs.
-
getOneofs
The list of types appearing in `oneof` definitions in this type.
repeated string oneofs = 3;- Specified by:
getOneofsin 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:
getOneofsBytesin 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:
getOptionsListin 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:
getOptionsCountin interfaceTypeOrBuilder
-
getOptions
The protocol buffer options.
repeated .google.protobuf.Option options = 4;- Specified by:
getOptionsin 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:
hasSourceContextin interfaceTypeOrBuilder- Returns:
- Whether the sourceContext field is set.
-
getSourceContext
The source context.
.google.protobuf.SourceContext source_context = 5;- Specified by:
getSourceContextin 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:
getSyntaxValuein interfaceTypeOrBuilder- Returns:
- The enum numeric value on the wire for syntax.
-
getSyntax
The source syntax.
.google.protobuf.Syntax syntax = 6;- Specified by:
getSyntaxin 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:
getEditionin interfaceTypeOrBuilder- Returns:
- The edition.
-
getEditionBytes
The source edition string, only valid when syntax is SYNTAX_EDITIONS.
string edition = 7;- Specified by:
getEditionBytesin 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:GeneratedMessageLiteA 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_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.
For use by generated code only.
- Specified by:
dynamicMethodin classGeneratedMessageLite<Type,Type.Builder>
-
getDefaultInstance
-
parser
-