|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.google.protobuf.AbstractMessage.Builder<BuilderType>
com.google.protobuf.GeneratedMessage.Builder<DescriptorProtos.DescriptorProto.Builder>
com.google.protobuf.DescriptorProtos.DescriptorProto.Builder
public static final class DescriptorProtos.DescriptorProto.Builder
| Methods inherited from class com.google.protobuf.GeneratedMessage.Builder |
|---|
addAll, addRepeatedField, clearField, getAllFields, getField, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, isInitialized, mergeUnknownFields, newBuilderForField, parseUnknownField, setField, setRepeatedField, setUnknownFields |
| Methods inherited from class com.google.protobuf.AbstractMessage.Builder |
|---|
mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
protected DescriptorProtos.DescriptorProto internalGetResult()
GeneratedMessage.Builder
internalGetResult in class GeneratedMessage.Builder<DescriptorProtos.DescriptorProto.Builder>public DescriptorProtos.DescriptorProto.Builder clear()
Message.Builder
clear in interface Message.Builderclear in class AbstractMessage.Builder<DescriptorProtos.DescriptorProto.Builder>public DescriptorProtos.DescriptorProto.Builder clone()
Message.Builder
clone in interface Message.Builderclone in class AbstractMessage.Builder<DescriptorProtos.DescriptorProto.Builder>Object.clone()public Descriptors.Descriptor getDescriptorForType()
Message.BuilderMessage.getDescriptorForType().
getDescriptorForType in interface Message.BuildergetDescriptorForType in class GeneratedMessage.Builder<DescriptorProtos.DescriptorProto.Builder>public DescriptorProtos.DescriptorProto getDefaultInstanceForType()
Message.BuilderMessage.getDefaultInstanceForType().
public DescriptorProtos.DescriptorProto build()
Message.Builderbuild(), clone() it first.
public DescriptorProtos.DescriptorProto buildPartial()
Message.BuilderMessage.Builder.build(), but does not throw an exception if the message
is missing required fields. Instead, a partial message is returned.
public DescriptorProtos.DescriptorProto.Builder mergeFrom(Message other)
Message.Builderother into the message being built. other must
have the exact same type as this (i.e.
getDescriptorForType() == other.getDescriptorForType()).
Merging occurs as follows. For each field:other,
then other's value overwrites the value in this message.other,
it is merged into the corresponding sub-message of this message
using the same merging rules.other are concatenated
with the elements in this message.
This is equivalent to the Message::MergeFrom method in C++.
mergeFrom in interface Message.BuildermergeFrom in class GeneratedMessage.Builder<DescriptorProtos.DescriptorProto.Builder>public DescriptorProtos.DescriptorProto.Builder mergeFrom(DescriptorProtos.DescriptorProto other)
public DescriptorProtos.DescriptorProto.Builder mergeFrom(CodedInputStream input)
throws java.io.IOException
Message.BuilderMessage.Builder.mergeFrom(Message).
Warning: This does not verify that all required fields are present in
the input message. If you call Message.Builder.build() without setting all
required fields, it will throw an UninitializedMessageException,
which is a RuntimeException and thus might not be caught. There
are a few good ways to deal with this:
Message.Builder.isInitialized() to verify that all required fields
are set before building.
parseFrom methods, then use Message.Builder.mergeFrom(Message)
to merge it with this one. parseFrom will throw an
InvalidProtocolBufferException (an IOException)
if some required fields are missing.
buildPartial() to build, which ignores missing
required fields.
Note: The caller should call
CodedInputStream.checkLastTagWas(int) after calling this to
verify that the last tag seen was the appropriate end-group tag,
or zero for EOF.
mergeFrom in interface Message.BuildermergeFrom in class AbstractMessage.Builder<DescriptorProtos.DescriptorProto.Builder>java.io.IOException
public DescriptorProtos.DescriptorProto.Builder mergeFrom(CodedInputStream input,
ExtensionRegistry extensionRegistry)
throws java.io.IOException
Message.BuilderMessage.Builder.mergeFrom(CodedInputStream), but also
parses extensions. The extensions that you want to be able to parse
must be registered in extensionRegistry. Extensions not in
the registry will be treated as unknown fields.
mergeFrom in interface Message.BuildermergeFrom in class AbstractMessage.Builder<DescriptorProtos.DescriptorProto.Builder>java.io.IOExceptionpublic boolean hasName()
public java.lang.String getName()
public DescriptorProtos.DescriptorProto.Builder setName(java.lang.String value)
public DescriptorProtos.DescriptorProto.Builder clearName()
public java.util.List<DescriptorProtos.FieldDescriptorProto> getFieldList()
public int getFieldCount()
public DescriptorProtos.FieldDescriptorProto getField(int index)
public DescriptorProtos.DescriptorProto.Builder setField(int index,
DescriptorProtos.FieldDescriptorProto value)
public DescriptorProtos.DescriptorProto.Builder setField(int index,
DescriptorProtos.FieldDescriptorProto.Builder builderForValue)
public DescriptorProtos.DescriptorProto.Builder addField(DescriptorProtos.FieldDescriptorProto value)
public DescriptorProtos.DescriptorProto.Builder addField(DescriptorProtos.FieldDescriptorProto.Builder builderForValue)
public DescriptorProtos.DescriptorProto.Builder addAllField(java.lang.Iterable<? extends DescriptorProtos.FieldDescriptorProto> values)
public DescriptorProtos.DescriptorProto.Builder clearField()
public java.util.List<DescriptorProtos.FieldDescriptorProto> getExtensionList()
public int getExtensionCount()
public DescriptorProtos.FieldDescriptorProto getExtension(int index)
public DescriptorProtos.DescriptorProto.Builder setExtension(int index,
DescriptorProtos.FieldDescriptorProto value)
public DescriptorProtos.DescriptorProto.Builder setExtension(int index,
DescriptorProtos.FieldDescriptorProto.Builder builderForValue)
public DescriptorProtos.DescriptorProto.Builder addExtension(DescriptorProtos.FieldDescriptorProto value)
public DescriptorProtos.DescriptorProto.Builder addExtension(DescriptorProtos.FieldDescriptorProto.Builder builderForValue)
public DescriptorProtos.DescriptorProto.Builder addAllExtension(java.lang.Iterable<? extends DescriptorProtos.FieldDescriptorProto> values)
public DescriptorProtos.DescriptorProto.Builder clearExtension()
public java.util.List<DescriptorProtos.DescriptorProto> getNestedTypeList()
public int getNestedTypeCount()
public DescriptorProtos.DescriptorProto getNestedType(int index)
public DescriptorProtos.DescriptorProto.Builder setNestedType(int index,
DescriptorProtos.DescriptorProto value)
public DescriptorProtos.DescriptorProto.Builder setNestedType(int index,
DescriptorProtos.DescriptorProto.Builder builderForValue)
public DescriptorProtos.DescriptorProto.Builder addNestedType(DescriptorProtos.DescriptorProto value)
public DescriptorProtos.DescriptorProto.Builder addNestedType(DescriptorProtos.DescriptorProto.Builder builderForValue)
public DescriptorProtos.DescriptorProto.Builder addAllNestedType(java.lang.Iterable<? extends DescriptorProtos.DescriptorProto> values)
public DescriptorProtos.DescriptorProto.Builder clearNestedType()
public java.util.List<DescriptorProtos.EnumDescriptorProto> getEnumTypeList()
public int getEnumTypeCount()
public DescriptorProtos.EnumDescriptorProto getEnumType(int index)
public DescriptorProtos.DescriptorProto.Builder setEnumType(int index,
DescriptorProtos.EnumDescriptorProto value)
public DescriptorProtos.DescriptorProto.Builder setEnumType(int index,
DescriptorProtos.EnumDescriptorProto.Builder builderForValue)
public DescriptorProtos.DescriptorProto.Builder addEnumType(DescriptorProtos.EnumDescriptorProto value)
public DescriptorProtos.DescriptorProto.Builder addEnumType(DescriptorProtos.EnumDescriptorProto.Builder builderForValue)
public DescriptorProtos.DescriptorProto.Builder addAllEnumType(java.lang.Iterable<? extends DescriptorProtos.EnumDescriptorProto> values)
public DescriptorProtos.DescriptorProto.Builder clearEnumType()
public java.util.List<DescriptorProtos.DescriptorProto.ExtensionRange> getExtensionRangeList()
public int getExtensionRangeCount()
public DescriptorProtos.DescriptorProto.ExtensionRange getExtensionRange(int index)
public DescriptorProtos.DescriptorProto.Builder setExtensionRange(int index,
DescriptorProtos.DescriptorProto.ExtensionRange value)
public DescriptorProtos.DescriptorProto.Builder setExtensionRange(int index,
DescriptorProtos.DescriptorProto.ExtensionRange.Builder builderForValue)
public DescriptorProtos.DescriptorProto.Builder addExtensionRange(DescriptorProtos.DescriptorProto.ExtensionRange value)
public DescriptorProtos.DescriptorProto.Builder addExtensionRange(DescriptorProtos.DescriptorProto.ExtensionRange.Builder builderForValue)
public DescriptorProtos.DescriptorProto.Builder addAllExtensionRange(java.lang.Iterable<? extends DescriptorProtos.DescriptorProto.ExtensionRange> values)
public DescriptorProtos.DescriptorProto.Builder clearExtensionRange()
public boolean hasOptions()
public DescriptorProtos.MessageOptions getOptions()
public DescriptorProtos.DescriptorProto.Builder setOptions(DescriptorProtos.MessageOptions value)
public DescriptorProtos.DescriptorProto.Builder setOptions(DescriptorProtos.MessageOptions.Builder builderForValue)
public DescriptorProtos.DescriptorProto.Builder mergeOptions(DescriptorProtos.MessageOptions value)
public DescriptorProtos.DescriptorProto.Builder clearOptions()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||