com.google.protobuf
Class DescriptorProtos.FileDescriptorProto.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<BuilderType>
com.google.protobuf.AbstractMessage.Builder<BuilderType>
com.google.protobuf.GeneratedMessage.Builder<DescriptorProtos.FileDescriptorProto.Builder>
com.google.protobuf.DescriptorProtos.FileDescriptorProto.Builder
- All Implemented Interfaces:
- Message.Builder, MessageLite.Builder, java.lang.Cloneable
- Enclosing class:
- DescriptorProtos.FileDescriptorProto
public static final class DescriptorProtos.FileDescriptorProto.Builder
- extends GeneratedMessage.Builder<DescriptorProtos.FileDescriptorProto.Builder>
|
Method Summary |
DescriptorProtos.FileDescriptorProto.Builder |
addAllDependency(java.lang.Iterable<? extends java.lang.String> values)
|
DescriptorProtos.FileDescriptorProto.Builder |
addAllEnumType(java.lang.Iterable<? extends DescriptorProtos.EnumDescriptorProto> values)
|
DescriptorProtos.FileDescriptorProto.Builder |
addAllExtension(java.lang.Iterable<? extends DescriptorProtos.FieldDescriptorProto> values)
|
DescriptorProtos.FileDescriptorProto.Builder |
addAllMessageType(java.lang.Iterable<? extends DescriptorProtos.DescriptorProto> values)
|
DescriptorProtos.FileDescriptorProto.Builder |
addAllService(java.lang.Iterable<? extends DescriptorProtos.ServiceDescriptorProto> values)
|
DescriptorProtos.FileDescriptorProto.Builder |
addDependency(java.lang.String value)
|
DescriptorProtos.FileDescriptorProto.Builder |
addEnumType(DescriptorProtos.EnumDescriptorProto.Builder builderForValue)
|
DescriptorProtos.FileDescriptorProto.Builder |
addEnumType(DescriptorProtos.EnumDescriptorProto value)
|
DescriptorProtos.FileDescriptorProto.Builder |
addExtension(DescriptorProtos.FieldDescriptorProto.Builder builderForValue)
|
DescriptorProtos.FileDescriptorProto.Builder |
addExtension(DescriptorProtos.FieldDescriptorProto value)
|
DescriptorProtos.FileDescriptorProto.Builder |
addMessageType(DescriptorProtos.DescriptorProto.Builder builderForValue)
|
DescriptorProtos.FileDescriptorProto.Builder |
addMessageType(DescriptorProtos.DescriptorProto value)
|
DescriptorProtos.FileDescriptorProto.Builder |
addService(DescriptorProtos.ServiceDescriptorProto.Builder builderForValue)
|
DescriptorProtos.FileDescriptorProto.Builder |
addService(DescriptorProtos.ServiceDescriptorProto value)
|
DescriptorProtos.FileDescriptorProto |
build()
Construct the final message. |
DescriptorProtos.FileDescriptorProto |
buildPartial()
Like MessageLite.Builder.build(), but does not throw an exception if the message
is missing required fields. |
DescriptorProtos.FileDescriptorProto.Builder |
clear()
Resets all fields to their default values. |
DescriptorProtos.FileDescriptorProto.Builder |
clearDependency()
|
DescriptorProtos.FileDescriptorProto.Builder |
clearEnumType()
|
DescriptorProtos.FileDescriptorProto.Builder |
clearExtension()
|
DescriptorProtos.FileDescriptorProto.Builder |
clearMessageType()
|
DescriptorProtos.FileDescriptorProto.Builder |
clearName()
|
DescriptorProtos.FileDescriptorProto.Builder |
clearOptions()
|
DescriptorProtos.FileDescriptorProto.Builder |
clearPackage()
|
DescriptorProtos.FileDescriptorProto.Builder |
clearService()
|
DescriptorProtos.FileDescriptorProto.Builder |
clone()
Clones the Builder. |
DescriptorProtos.FileDescriptorProto |
getDefaultInstanceForType()
Get the message's type's default instance. |
java.lang.String |
getDependency(int index)
|
int |
getDependencyCount()
|
java.util.List<java.lang.String> |
getDependencyList()
|
Descriptors.Descriptor |
getDescriptorForType()
Get the message's type's descriptor. |
DescriptorProtos.EnumDescriptorProto |
getEnumType(int index)
|
int |
getEnumTypeCount()
|
java.util.List<DescriptorProtos.EnumDescriptorProto> |
getEnumTypeList()
|
DescriptorProtos.FieldDescriptorProto |
getExtension(int index)
|
int |
getExtensionCount()
|
java.util.List<DescriptorProtos.FieldDescriptorProto> |
getExtensionList()
|
DescriptorProtos.DescriptorProto |
getMessageType(int index)
|
int |
getMessageTypeCount()
|
java.util.List<DescriptorProtos.DescriptorProto> |
getMessageTypeList()
|
java.lang.String |
getName()
|
DescriptorProtos.FileOptions |
getOptions()
|
java.lang.String |
getPackage()
|
DescriptorProtos.ServiceDescriptorProto |
getService(int index)
|
int |
getServiceCount()
|
java.util.List<DescriptorProtos.ServiceDescriptorProto> |
getServiceList()
|
boolean |
hasName()
|
boolean |
hasOptions()
|
boolean |
hasPackage()
|
protected DescriptorProtos.FileDescriptorProto |
internalGetResult()
Get the message being built. |
boolean |
isInitialized()
Returns true if all required fields in the message and all embedded
messages are set, false otherwise. |
DescriptorProtos.FileDescriptorProto.Builder |
mergeFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry)
Like MessageLite.Builder.mergeFrom(CodedInputStream), but also
parses extensions. |
DescriptorProtos.FileDescriptorProto.Builder |
mergeFrom(DescriptorProtos.FileDescriptorProto other)
|
DescriptorProtos.FileDescriptorProto.Builder |
mergeFrom(Message other)
Merge other into the message being built. |
DescriptorProtos.FileDescriptorProto.Builder |
mergeOptions(DescriptorProtos.FileOptions value)
|
DescriptorProtos.FileDescriptorProto.Builder |
setDependency(int index,
java.lang.String value)
|
DescriptorProtos.FileDescriptorProto.Builder |
setEnumType(int index,
DescriptorProtos.EnumDescriptorProto.Builder builderForValue)
|
DescriptorProtos.FileDescriptorProto.Builder |
setEnumType(int index,
DescriptorProtos.EnumDescriptorProto value)
|
DescriptorProtos.FileDescriptorProto.Builder |
setExtension(int index,
DescriptorProtos.FieldDescriptorProto.Builder builderForValue)
|
DescriptorProtos.FileDescriptorProto.Builder |
setExtension(int index,
DescriptorProtos.FieldDescriptorProto value)
|
DescriptorProtos.FileDescriptorProto.Builder |
setMessageType(int index,
DescriptorProtos.DescriptorProto.Builder builderForValue)
|
DescriptorProtos.FileDescriptorProto.Builder |
setMessageType(int index,
DescriptorProtos.DescriptorProto value)
|
DescriptorProtos.FileDescriptorProto.Builder |
setName(java.lang.String value)
|
DescriptorProtos.FileDescriptorProto.Builder |
setOptions(DescriptorProtos.FileOptions.Builder builderForValue)
|
DescriptorProtos.FileDescriptorProto.Builder |
setOptions(DescriptorProtos.FileOptions value)
|
DescriptorProtos.FileDescriptorProto.Builder |
setPackage(java.lang.String value)
|
DescriptorProtos.FileDescriptorProto.Builder |
setService(int index,
DescriptorProtos.ServiceDescriptorProto.Builder builderForValue)
|
DescriptorProtos.FileDescriptorProto.Builder |
setService(int index,
DescriptorProtos.ServiceDescriptorProto value)
|
| Methods inherited from class com.google.protobuf.GeneratedMessage.Builder |
addRepeatedField, clearField, getAllFields, getField, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, 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, mergeFrom, newUninitializedMessageException |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
internalGetResult
protected DescriptorProtos.FileDescriptorProto internalGetResult()
- Description copied from class:
GeneratedMessage.Builder
- Get the message being built. We don't just pass this to the
constructor because it becomes null when build() is called.
- Specified by:
internalGetResult in class GeneratedMessage.Builder<DescriptorProtos.FileDescriptorProto.Builder>
clear
public DescriptorProtos.FileDescriptorProto.Builder clear()
- Description copied from interface:
MessageLite.Builder
- Resets all fields to their default values.
- Specified by:
clear in interface Message.Builder- Specified by:
clear in interface MessageLite.Builder- Overrides:
clear in class AbstractMessage.Builder<DescriptorProtos.FileDescriptorProto.Builder>
clone
public DescriptorProtos.FileDescriptorProto.Builder clone()
- Description copied from interface:
MessageLite.Builder
- Clones the Builder.
- Specified by:
clone in interface Message.Builder- Specified by:
clone in interface MessageLite.Builder- Overrides:
clone in class GeneratedMessage.Builder<DescriptorProtos.FileDescriptorProto.Builder>
- See Also:
Object.clone()
getDescriptorForType
public Descriptors.Descriptor getDescriptorForType()
- Description copied from interface:
Message.Builder
- Get the message's type's descriptor.
See
Message.getDescriptorForType().
- Specified by:
getDescriptorForType in interface Message.Builder- Overrides:
getDescriptorForType in class GeneratedMessage.Builder<DescriptorProtos.FileDescriptorProto.Builder>
getDefaultInstanceForType
public DescriptorProtos.FileDescriptorProto getDefaultInstanceForType()
- Description copied from interface:
MessageLite.Builder
- Get the message's type's default instance.
See
MessageLite.getDefaultInstanceForType().
isInitialized
public boolean isInitialized()
- Description copied from interface:
MessageLite.Builder
- Returns true if all required fields in the message and all embedded
messages are set, false otherwise.
- Specified by:
isInitialized in interface MessageLite.Builder- Overrides:
isInitialized in class GeneratedMessage.Builder<DescriptorProtos.FileDescriptorProto.Builder>
build
public DescriptorProtos.FileDescriptorProto build()
- Description copied from interface:
MessageLite.Builder
- Construct the final message. Once this is called, the Builder is no
longer valid, and calling any other method will result in undefined
behavior and may throw a NullPointerException. If you need to continue
working with the builder after calling
build(), clone()
it first.
buildPartial
public DescriptorProtos.FileDescriptorProto buildPartial()
- Description copied from interface:
MessageLite.Builder
- Like
MessageLite.Builder.build(), but does not throw an exception if the message
is missing required fields. Instead, a partial message is returned.
Once this is called, the Builder is no longer valid, and calling any
will result in undefined behavior and may throw a NullPointerException.
If you need to continue working with the builder after calling
buildPartial(), clone() it first.
mergeFrom
public DescriptorProtos.FileDescriptorProto.Builder mergeFrom(Message other)
- Description copied from interface:
Message.Builder
- Merge
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:
* For singular primitive fields, if the field is set in other,
then other's value overwrites the value in this message.
* For singular message fields, if the field is set in other,
it is merged into the corresponding sub-message of this message
using the same merging rules.
* For repeated fields, the elements in other are concatenated
with the elements in this message.
This is equivalent to the Message::MergeFrom method in C++.
- Specified by:
mergeFrom in interface Message.Builder- Overrides:
mergeFrom in class AbstractMessage.Builder<DescriptorProtos.FileDescriptorProto.Builder>
mergeFrom
public DescriptorProtos.FileDescriptorProto.Builder mergeFrom(DescriptorProtos.FileDescriptorProto other)
mergeFrom
public DescriptorProtos.FileDescriptorProto.Builder mergeFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry)
throws java.io.IOException
- Description copied from interface:
MessageLite.Builder
- Like
MessageLite.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.
- Specified by:
mergeFrom in interface Message.Builder- Specified by:
mergeFrom in interface MessageLite.Builder- Overrides:
mergeFrom in class AbstractMessage.Builder<DescriptorProtos.FileDescriptorProto.Builder>
- Throws:
java.io.IOException
hasName
public boolean hasName()
getName
public java.lang.String getName()
setName
public DescriptorProtos.FileDescriptorProto.Builder setName(java.lang.String value)
clearName
public DescriptorProtos.FileDescriptorProto.Builder clearName()
hasPackage
public boolean hasPackage()
getPackage
public java.lang.String getPackage()
setPackage
public DescriptorProtos.FileDescriptorProto.Builder setPackage(java.lang.String value)
clearPackage
public DescriptorProtos.FileDescriptorProto.Builder clearPackage()
getDependencyList
public java.util.List<java.lang.String> getDependencyList()
getDependencyCount
public int getDependencyCount()
getDependency
public java.lang.String getDependency(int index)
setDependency
public DescriptorProtos.FileDescriptorProto.Builder setDependency(int index,
java.lang.String value)
addDependency
public DescriptorProtos.FileDescriptorProto.Builder addDependency(java.lang.String value)
addAllDependency
public DescriptorProtos.FileDescriptorProto.Builder addAllDependency(java.lang.Iterable<? extends java.lang.String> values)
clearDependency
public DescriptorProtos.FileDescriptorProto.Builder clearDependency()
getMessageTypeList
public java.util.List<DescriptorProtos.DescriptorProto> getMessageTypeList()
getMessageTypeCount
public int getMessageTypeCount()
getMessageType
public DescriptorProtos.DescriptorProto getMessageType(int index)
setMessageType
public DescriptorProtos.FileDescriptorProto.Builder setMessageType(int index,
DescriptorProtos.DescriptorProto value)
setMessageType
public DescriptorProtos.FileDescriptorProto.Builder setMessageType(int index,
DescriptorProtos.DescriptorProto.Builder builderForValue)
addMessageType
public DescriptorProtos.FileDescriptorProto.Builder addMessageType(DescriptorProtos.DescriptorProto value)
addMessageType
public DescriptorProtos.FileDescriptorProto.Builder addMessageType(DescriptorProtos.DescriptorProto.Builder builderForValue)
addAllMessageType
public DescriptorProtos.FileDescriptorProto.Builder addAllMessageType(java.lang.Iterable<? extends DescriptorProtos.DescriptorProto> values)
clearMessageType
public DescriptorProtos.FileDescriptorProto.Builder clearMessageType()
getEnumTypeList
public java.util.List<DescriptorProtos.EnumDescriptorProto> getEnumTypeList()
getEnumTypeCount
public int getEnumTypeCount()
getEnumType
public DescriptorProtos.EnumDescriptorProto getEnumType(int index)
setEnumType
public DescriptorProtos.FileDescriptorProto.Builder setEnumType(int index,
DescriptorProtos.EnumDescriptorProto value)
setEnumType
public DescriptorProtos.FileDescriptorProto.Builder setEnumType(int index,
DescriptorProtos.EnumDescriptorProto.Builder builderForValue)
addEnumType
public DescriptorProtos.FileDescriptorProto.Builder addEnumType(DescriptorProtos.EnumDescriptorProto value)
addEnumType
public DescriptorProtos.FileDescriptorProto.Builder addEnumType(DescriptorProtos.EnumDescriptorProto.Builder builderForValue)
addAllEnumType
public DescriptorProtos.FileDescriptorProto.Builder addAllEnumType(java.lang.Iterable<? extends DescriptorProtos.EnumDescriptorProto> values)
clearEnumType
public DescriptorProtos.FileDescriptorProto.Builder clearEnumType()
getServiceList
public java.util.List<DescriptorProtos.ServiceDescriptorProto> getServiceList()
getServiceCount
public int getServiceCount()
getService
public DescriptorProtos.ServiceDescriptorProto getService(int index)
setService
public DescriptorProtos.FileDescriptorProto.Builder setService(int index,
DescriptorProtos.ServiceDescriptorProto value)
setService
public DescriptorProtos.FileDescriptorProto.Builder setService(int index,
DescriptorProtos.ServiceDescriptorProto.Builder builderForValue)
addService
public DescriptorProtos.FileDescriptorProto.Builder addService(DescriptorProtos.ServiceDescriptorProto value)
addService
public DescriptorProtos.FileDescriptorProto.Builder addService(DescriptorProtos.ServiceDescriptorProto.Builder builderForValue)
addAllService
public DescriptorProtos.FileDescriptorProto.Builder addAllService(java.lang.Iterable<? extends DescriptorProtos.ServiceDescriptorProto> values)
clearService
public DescriptorProtos.FileDescriptorProto.Builder clearService()
getExtensionList
public java.util.List<DescriptorProtos.FieldDescriptorProto> getExtensionList()
getExtensionCount
public int getExtensionCount()
getExtension
public DescriptorProtos.FieldDescriptorProto getExtension(int index)
setExtension
public DescriptorProtos.FileDescriptorProto.Builder setExtension(int index,
DescriptorProtos.FieldDescriptorProto value)
setExtension
public DescriptorProtos.FileDescriptorProto.Builder setExtension(int index,
DescriptorProtos.FieldDescriptorProto.Builder builderForValue)
addExtension
public DescriptorProtos.FileDescriptorProto.Builder addExtension(DescriptorProtos.FieldDescriptorProto value)
addExtension
public DescriptorProtos.FileDescriptorProto.Builder addExtension(DescriptorProtos.FieldDescriptorProto.Builder builderForValue)
addAllExtension
public DescriptorProtos.FileDescriptorProto.Builder addAllExtension(java.lang.Iterable<? extends DescriptorProtos.FieldDescriptorProto> values)
clearExtension
public DescriptorProtos.FileDescriptorProto.Builder clearExtension()
hasOptions
public boolean hasOptions()
getOptions
public DescriptorProtos.FileOptions getOptions()
setOptions
public DescriptorProtos.FileDescriptorProto.Builder setOptions(DescriptorProtos.FileOptions value)
setOptions
public DescriptorProtos.FileDescriptorProto.Builder setOptions(DescriptorProtos.FileOptions.Builder builderForValue)
mergeOptions
public DescriptorProtos.FileDescriptorProto.Builder mergeOptions(DescriptorProtos.FileOptions value)
clearOptions
public DescriptorProtos.FileDescriptorProto.Builder clearOptions()
Copyright © 2008-2009 Google. All Rights Reserved.