|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.protobuf.AbstractMessage.Builder<BuilderType> com.google.protobuf.GeneratedMessage.Builder<DescriptorProtos.FileDescriptorProto.Builder> com.google.protobuf.DescriptorProtos.FileDescriptorProto.Builder
public static final class DescriptorProtos.FileDescriptorProto.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.FileDescriptorProto internalGetResult()
GeneratedMessage.Builder
internalGetResult
in class GeneratedMessage.Builder<DescriptorProtos.FileDescriptorProto.Builder>
public DescriptorProtos.FileDescriptorProto.Builder clear()
Message.Builder
clear
in interface Message.Builder
clear
in class AbstractMessage.Builder<DescriptorProtos.FileDescriptorProto.Builder>
public DescriptorProtos.FileDescriptorProto.Builder clone()
Message.Builder
clone
in interface Message.Builder
clone
in class AbstractMessage.Builder<DescriptorProtos.FileDescriptorProto.Builder>
Object.clone()
public Descriptors.Descriptor getDescriptorForType()
Message.Builder
Message.getDescriptorForType()
.
getDescriptorForType
in interface Message.Builder
getDescriptorForType
in class GeneratedMessage.Builder<DescriptorProtos.FileDescriptorProto.Builder>
public DescriptorProtos.FileDescriptorProto getDefaultInstanceForType()
Message.Builder
Message.getDefaultInstanceForType()
.
public DescriptorProtos.FileDescriptorProto build()
Message.Builder
build()
, clone()
it first.
public DescriptorProtos.FileDescriptorProto buildPartial()
Message.Builder
Message.Builder.build()
, but does not throw an exception if the message
is missing required fields. Instead, a partial message is returned.
public DescriptorProtos.FileDescriptorProto.Builder mergeFrom(Message other)
Message.Builder
other
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.Builder
mergeFrom
in class GeneratedMessage.Builder<DescriptorProtos.FileDescriptorProto.Builder>
public DescriptorProtos.FileDescriptorProto.Builder mergeFrom(DescriptorProtos.FileDescriptorProto other)
public DescriptorProtos.FileDescriptorProto.Builder mergeFrom(CodedInputStream input) throws java.io.IOException
Message.Builder
Message.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.Builder
mergeFrom
in class AbstractMessage.Builder<DescriptorProtos.FileDescriptorProto.Builder>
java.io.IOException
public DescriptorProtos.FileDescriptorProto.Builder mergeFrom(CodedInputStream input, ExtensionRegistry extensionRegistry) throws java.io.IOException
Message.Builder
Message.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.Builder
mergeFrom
in class AbstractMessage.Builder<DescriptorProtos.FileDescriptorProto.Builder>
java.io.IOException
public boolean hasName()
public java.lang.String getName()
public DescriptorProtos.FileDescriptorProto.Builder setName(java.lang.String value)
public DescriptorProtos.FileDescriptorProto.Builder clearName()
public boolean hasPackage()
public java.lang.String getPackage()
public DescriptorProtos.FileDescriptorProto.Builder setPackage(java.lang.String value)
public DescriptorProtos.FileDescriptorProto.Builder clearPackage()
public java.util.List<java.lang.String> getDependencyList()
public int getDependencyCount()
public java.lang.String getDependency(int index)
public DescriptorProtos.FileDescriptorProto.Builder setDependency(int index, java.lang.String value)
public DescriptorProtos.FileDescriptorProto.Builder addDependency(java.lang.String value)
public DescriptorProtos.FileDescriptorProto.Builder addAllDependency(java.lang.Iterable<? extends java.lang.String> values)
public DescriptorProtos.FileDescriptorProto.Builder clearDependency()
public java.util.List<DescriptorProtos.DescriptorProto> getMessageTypeList()
public int getMessageTypeCount()
public DescriptorProtos.DescriptorProto getMessageType(int index)
public DescriptorProtos.FileDescriptorProto.Builder setMessageType(int index, DescriptorProtos.DescriptorProto value)
public DescriptorProtos.FileDescriptorProto.Builder setMessageType(int index, DescriptorProtos.DescriptorProto.Builder builderForValue)
public DescriptorProtos.FileDescriptorProto.Builder addMessageType(DescriptorProtos.DescriptorProto value)
public DescriptorProtos.FileDescriptorProto.Builder addMessageType(DescriptorProtos.DescriptorProto.Builder builderForValue)
public DescriptorProtos.FileDescriptorProto.Builder addAllMessageType(java.lang.Iterable<? extends DescriptorProtos.DescriptorProto> values)
public DescriptorProtos.FileDescriptorProto.Builder clearMessageType()
public java.util.List<DescriptorProtos.EnumDescriptorProto> getEnumTypeList()
public int getEnumTypeCount()
public DescriptorProtos.EnumDescriptorProto getEnumType(int index)
public DescriptorProtos.FileDescriptorProto.Builder setEnumType(int index, DescriptorProtos.EnumDescriptorProto value)
public DescriptorProtos.FileDescriptorProto.Builder setEnumType(int index, DescriptorProtos.EnumDescriptorProto.Builder builderForValue)
public DescriptorProtos.FileDescriptorProto.Builder addEnumType(DescriptorProtos.EnumDescriptorProto value)
public DescriptorProtos.FileDescriptorProto.Builder addEnumType(DescriptorProtos.EnumDescriptorProto.Builder builderForValue)
public DescriptorProtos.FileDescriptorProto.Builder addAllEnumType(java.lang.Iterable<? extends DescriptorProtos.EnumDescriptorProto> values)
public DescriptorProtos.FileDescriptorProto.Builder clearEnumType()
public java.util.List<DescriptorProtos.ServiceDescriptorProto> getServiceList()
public int getServiceCount()
public DescriptorProtos.ServiceDescriptorProto getService(int index)
public DescriptorProtos.FileDescriptorProto.Builder setService(int index, DescriptorProtos.ServiceDescriptorProto value)
public DescriptorProtos.FileDescriptorProto.Builder setService(int index, DescriptorProtos.ServiceDescriptorProto.Builder builderForValue)
public DescriptorProtos.FileDescriptorProto.Builder addService(DescriptorProtos.ServiceDescriptorProto value)
public DescriptorProtos.FileDescriptorProto.Builder addService(DescriptorProtos.ServiceDescriptorProto.Builder builderForValue)
public DescriptorProtos.FileDescriptorProto.Builder addAllService(java.lang.Iterable<? extends DescriptorProtos.ServiceDescriptorProto> values)
public DescriptorProtos.FileDescriptorProto.Builder clearService()
public java.util.List<DescriptorProtos.FieldDescriptorProto> getExtensionList()
public int getExtensionCount()
public DescriptorProtos.FieldDescriptorProto getExtension(int index)
public DescriptorProtos.FileDescriptorProto.Builder setExtension(int index, DescriptorProtos.FieldDescriptorProto value)
public DescriptorProtos.FileDescriptorProto.Builder setExtension(int index, DescriptorProtos.FieldDescriptorProto.Builder builderForValue)
public DescriptorProtos.FileDescriptorProto.Builder addExtension(DescriptorProtos.FieldDescriptorProto value)
public DescriptorProtos.FileDescriptorProto.Builder addExtension(DescriptorProtos.FieldDescriptorProto.Builder builderForValue)
public DescriptorProtos.FileDescriptorProto.Builder addAllExtension(java.lang.Iterable<? extends DescriptorProtos.FieldDescriptorProto> values)
public DescriptorProtos.FileDescriptorProto.Builder clearExtension()
public boolean hasOptions()
public DescriptorProtos.FileOptions getOptions()
public DescriptorProtos.FileDescriptorProto.Builder setOptions(DescriptorProtos.FileOptions value)
public DescriptorProtos.FileDescriptorProto.Builder setOptions(DescriptorProtos.FileOptions.Builder builderForValue)
public DescriptorProtos.FileDescriptorProto.Builder mergeOptions(DescriptorProtos.FileOptions value)
public DescriptorProtos.FileDescriptorProto.Builder clearOptions()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |