public final class Type extends GeneratedMessage implements TypeOrBuilder
google.protobuf.Type
A light-weight descriptor for a proto message type.
Modifier and Type | Class and Description |
---|---|
static class |
Type.Builder
Protobuf type
google.protobuf.Type |
GeneratedMessage.BuilderParent, GeneratedMessage.ExtendableBuilder<MessageType extends GeneratedMessage.ExtendableMessage,BuilderType extends GeneratedMessage.ExtendableBuilder>, GeneratedMessage.ExtendableMessage<MessageType extends GeneratedMessage.ExtendableMessage>, GeneratedMessage.ExtendableMessageOrBuilder<MessageType extends GeneratedMessage.ExtendableMessage>, GeneratedMessage.FieldAccessorTable, GeneratedMessage.GeneratedExtension<ContainingType extends Message,Type>
Modifier and Type | Field and Description |
---|---|
static int |
FIELDS_FIELD_NUMBER |
static int |
NAME_FIELD_NUMBER |
static int |
ONEOFS_FIELD_NUMBER |
static int |
OPTIONS_FIELD_NUMBER |
static Parser<Type> |
PARSER |
static int |
SOURCE_CONTEXT_FIELD_NUMBER |
alwaysUseFieldBuilders, unknownFields
memoizedSize
memoizedHashCode
Modifier and Type | Method and Description |
---|---|
static Type |
getDefaultInstance() |
Type |
getDefaultInstanceForType()
Get an instance of the type with no fields set.
|
static Descriptors.Descriptor |
getDescriptor() |
Field |
getFields(int index)
repeated .google.protobuf.Field fields = 2; |
int |
getFieldsCount()
repeated .google.protobuf.Field fields = 2; |
List<Field> |
getFieldsList()
repeated .google.protobuf.Field fields = 2; |
FieldOrBuilder |
getFieldsOrBuilder(int index)
repeated .google.protobuf.Field fields = 2; |
List<? extends FieldOrBuilder> |
getFieldsOrBuilderList()
repeated .google.protobuf.Field fields = 2; |
String |
getName()
optional string name = 1; |
ByteString |
getNameBytes()
optional string name = 1; |
String |
getOneofs(int index)
repeated string oneofs = 3; |
ByteString |
getOneofsBytes(int index)
repeated string oneofs = 3; |
int |
getOneofsCount()
repeated string oneofs = 3; |
ProtocolStringList |
getOneofsList()
repeated string oneofs = 3; |
Option |
getOptions(int index)
repeated .google.protobuf.Option options = 4; |
int |
getOptionsCount()
repeated .google.protobuf.Option options = 4; |
List<Option> |
getOptionsList()
repeated .google.protobuf.Option options = 4; |
OptionOrBuilder |
getOptionsOrBuilder(int index)
repeated .google.protobuf.Option options = 4; |
List<? extends OptionOrBuilder> |
getOptionsOrBuilderList()
repeated .google.protobuf.Option options = 4; |
Parser<Type> |
getParserForType()
Gets the parser for a message of the same type as this message.
|
int |
getSerializedSize()
Get the number of bytes required to encode this message.
|
SourceContext |
getSourceContext()
optional .google.protobuf.SourceContext source_context = 5; |
SourceContextOrBuilder |
getSourceContextOrBuilder()
optional .google.protobuf.SourceContext source_context = 5; |
UnknownFieldSet |
getUnknownFields()
Get the
UnknownFieldSet for this message. |
boolean |
hasSourceContext()
optional .google.protobuf.SourceContext source_context = 5; |
protected GeneratedMessage.FieldAccessorTable |
internalGetFieldAccessorTable()
Get the FieldAccessorTable for this type.
|
boolean |
isInitialized()
Returns true if all required fields in the message and all embedded
messages are set, false otherwise.
|
static Type.Builder |
newBuilder() |
static Type.Builder |
newBuilder(Type prototype) |
Type.Builder |
newBuilderForType()
Constructs a new builder for a message of the same type as this message.
|
protected Type.Builder |
newBuilderForType(GeneratedMessage.BuilderParent parent) |
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) |
Type.Builder |
toBuilder()
Constructs a builder initialized with the current message.
|
void |
writeTo(CodedOutputStream output)
Serializes the message and writes it to
output . |
getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, newFileScopedGeneratedExtension, newFileScopedGeneratedExtension, newMessageScopedGeneratedExtension, newMessageScopedGeneratedExtension, parseUnknownField, writeReplace
equals, findInitializationErrors, getInitializationErrorString, hashCode, hashFields, toString
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof
toByteArray, toByteString, writeDelimitedTo, writeTo
public static final int NAME_FIELD_NUMBER
public static final int FIELDS_FIELD_NUMBER
public static final int ONEOFS_FIELD_NUMBER
public static final int OPTIONS_FIELD_NUMBER
public static final int SOURCE_CONTEXT_FIELD_NUMBER
public final UnknownFieldSet getUnknownFields()
MessageOrBuilder
UnknownFieldSet
for this message.getUnknownFields
in interface MessageOrBuilder
getUnknownFields
in class GeneratedMessage
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
GeneratedMessage
internalGetFieldAccessorTable
in class GeneratedMessage
public String getName()
optional string name = 1;
The fully qualified message name.
getName
in interface TypeOrBuilder
public ByteString getNameBytes()
optional string name = 1;
The fully qualified message name.
getNameBytes
in interface TypeOrBuilder
public List<Field> getFieldsList()
repeated .google.protobuf.Field fields = 2;
The list of fields.
getFieldsList
in interface TypeOrBuilder
public List<? extends FieldOrBuilder> getFieldsOrBuilderList()
repeated .google.protobuf.Field fields = 2;
The list of fields.
getFieldsOrBuilderList
in interface TypeOrBuilder
public int getFieldsCount()
repeated .google.protobuf.Field fields = 2;
The list of fields.
getFieldsCount
in interface TypeOrBuilder
public Field getFields(int index)
repeated .google.protobuf.Field fields = 2;
The list of fields.
getFields
in interface TypeOrBuilder
public FieldOrBuilder getFieldsOrBuilder(int index)
repeated .google.protobuf.Field fields = 2;
The list of fields.
getFieldsOrBuilder
in interface TypeOrBuilder
public ProtocolStringList getOneofsList()
repeated string oneofs = 3;
The list of oneof definitions. The list of oneofs declared in this Type
getOneofsList
in interface TypeOrBuilder
public int getOneofsCount()
repeated string oneofs = 3;
The list of oneof definitions. The list of oneofs declared in this Type
getOneofsCount
in interface TypeOrBuilder
public String getOneofs(int index)
repeated string oneofs = 3;
The list of oneof definitions. The list of oneofs declared in this Type
getOneofs
in interface TypeOrBuilder
public ByteString getOneofsBytes(int index)
repeated string oneofs = 3;
The list of oneof definitions. The list of oneofs declared in this Type
getOneofsBytes
in interface TypeOrBuilder
public List<Option> getOptionsList()
repeated .google.protobuf.Option options = 4;
The proto options.
getOptionsList
in interface TypeOrBuilder
public List<? extends OptionOrBuilder> getOptionsOrBuilderList()
repeated .google.protobuf.Option options = 4;
The proto options.
getOptionsOrBuilderList
in interface TypeOrBuilder
public int getOptionsCount()
repeated .google.protobuf.Option options = 4;
The proto options.
getOptionsCount
in interface TypeOrBuilder
public Option getOptions(int index)
repeated .google.protobuf.Option options = 4;
The proto options.
getOptions
in interface TypeOrBuilder
public OptionOrBuilder getOptionsOrBuilder(int index)
repeated .google.protobuf.Option options = 4;
The proto options.
getOptionsOrBuilder
in interface TypeOrBuilder
public boolean hasSourceContext()
optional .google.protobuf.SourceContext source_context = 5;
The source context.
hasSourceContext
in interface TypeOrBuilder
public SourceContext getSourceContext()
optional .google.protobuf.SourceContext source_context = 5;
The source context.
getSourceContext
in interface TypeOrBuilder
public SourceContextOrBuilder getSourceContextOrBuilder()
optional .google.protobuf.SourceContext source_context = 5;
The source context.
getSourceContextOrBuilder
in interface TypeOrBuilder
public final boolean isInitialized()
MessageLiteOrBuilder
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessage
public void writeTo(CodedOutputStream output) throws IOException
MessageLite
output
. This does not
flush or close the stream.writeTo
in interface MessageLite
writeTo
in class GeneratedMessage
IOException
public int getSerializedSize()
MessageLite
getSerializedSize
in interface MessageLite
getSerializedSize
in class GeneratedMessage
public static Type parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Type parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Type parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Type parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Type parseFrom(InputStream input) throws IOException
IOException
public static Type parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static Type parseDelimitedFrom(InputStream input) throws IOException
IOException
public static Type parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static Type parseFrom(CodedInputStream input) throws IOException
IOException
public static Type parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public Type.Builder newBuilderForType()
MessageLite
newBuilderForType
in interface Message
newBuilderForType
in interface MessageLite
public static Type.Builder newBuilder()
public static Type.Builder newBuilder(Type prototype)
public Type.Builder toBuilder()
MessageLite
toBuilder
in interface Message
toBuilder
in interface MessageLite
protected Type.Builder newBuilderForType(GeneratedMessage.BuilderParent parent)
newBuilderForType
in class GeneratedMessage
public static Type getDefaultInstance()
public Parser<Type> getParserForType()
MessageLite
getParserForType
in interface Message
getParserForType
in interface MessageLite
getParserForType
in class GeneratedMessage
public Type getDefaultInstanceForType()
MessageLiteOrBuilder
getDefaultInstance()
method of generated message classes in that
this method is an abstract method of the MessageLite
interface
whereas getDefaultInstance()
is a static method of a specific
class. They return the same thing.getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
Copyright © 2008–2015 Google. All rights reserved.