Package com.google.protobuf.compiler
Class PluginProtos.CodeGeneratorResponse.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderType>
-
- com.google.protobuf.GeneratedMessageV3.Builder<PluginProtos.CodeGeneratorResponse.Builder>
-
- com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.Builder
-
- All Implemented Interfaces:
PluginProtos.CodeGeneratorResponseOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,java.lang.Cloneable
- Enclosing class:
- PluginProtos.CodeGeneratorResponse
public static final class PluginProtos.CodeGeneratorResponse.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<PluginProtos.CodeGeneratorResponse.Builder> implements PluginProtos.CodeGeneratorResponseOrBuilder
The plugin writes an encoded CodeGeneratorResponse to stdout.
Protobuf typegoogle.protobuf.compiler.CodeGeneratorResponse
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PluginProtos.CodeGeneratorResponse.BuilderaddAllFile(java.lang.Iterable<? extends PluginProtos.CodeGeneratorResponse.File> values)repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;PluginProtos.CodeGeneratorResponse.BuilderaddFile(int index, PluginProtos.CodeGeneratorResponse.File value)repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;PluginProtos.CodeGeneratorResponse.BuilderaddFile(int index, PluginProtos.CodeGeneratorResponse.File.Builder builderForValue)repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;PluginProtos.CodeGeneratorResponse.BuilderaddFile(PluginProtos.CodeGeneratorResponse.File value)repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;PluginProtos.CodeGeneratorResponse.BuilderaddFile(PluginProtos.CodeGeneratorResponse.File.Builder builderForValue)repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;PluginProtos.CodeGeneratorResponse.File.BuilderaddFileBuilder()repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;PluginProtos.CodeGeneratorResponse.File.BuilderaddFileBuilder(int index)repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;PluginProtos.CodeGeneratorResponse.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)PluginProtos.CodeGeneratorResponsebuild()PluginProtos.CodeGeneratorResponsebuildPartial()PluginProtos.CodeGeneratorResponse.Builderclear()PluginProtos.CodeGeneratorResponse.BuilderclearError()Error message.PluginProtos.CodeGeneratorResponse.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)PluginProtos.CodeGeneratorResponse.BuilderclearFile()repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;PluginProtos.CodeGeneratorResponse.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)PluginProtos.CodeGeneratorResponse.BuilderclearSupportedFeatures()A bitmask of supported features that the code generator supports.PluginProtos.CodeGeneratorResponse.Builderclone()PluginProtos.CodeGeneratorResponsegetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()java.lang.StringgetError()Error message.com.google.protobuf.ByteStringgetErrorBytes()Error message.PluginProtos.CodeGeneratorResponse.FilegetFile(int index)repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;PluginProtos.CodeGeneratorResponse.File.BuildergetFileBuilder(int index)repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;java.util.List<PluginProtos.CodeGeneratorResponse.File.Builder>getFileBuilderList()repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;intgetFileCount()repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;java.util.List<PluginProtos.CodeGeneratorResponse.File>getFileList()repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;PluginProtos.CodeGeneratorResponse.FileOrBuildergetFileOrBuilder(int index)repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;java.util.List<? extends PluginProtos.CodeGeneratorResponse.FileOrBuilder>getFileOrBuilderList()repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;longgetSupportedFeatures()A bitmask of supported features that the code generator supports.booleanhasError()Error message.booleanhasSupportedFeatures()A bitmask of supported features that the code generator supports.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()PluginProtos.CodeGeneratorResponse.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)PluginProtos.CodeGeneratorResponse.BuildermergeFrom(PluginProtos.CodeGeneratorResponse other)PluginProtos.CodeGeneratorResponse.BuildermergeFrom(com.google.protobuf.Message other)PluginProtos.CodeGeneratorResponse.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)PluginProtos.CodeGeneratorResponse.BuilderremoveFile(int index)repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;PluginProtos.CodeGeneratorResponse.BuildersetError(java.lang.String value)Error message.PluginProtos.CodeGeneratorResponse.BuildersetErrorBytes(com.google.protobuf.ByteString value)Error message.PluginProtos.CodeGeneratorResponse.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)PluginProtos.CodeGeneratorResponse.BuildersetFile(int index, PluginProtos.CodeGeneratorResponse.File value)repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;PluginProtos.CodeGeneratorResponse.BuildersetFile(int index, PluginProtos.CodeGeneratorResponse.File.Builder builderForValue)repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;PluginProtos.CodeGeneratorResponse.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)PluginProtos.CodeGeneratorResponse.BuildersetSupportedFeatures(long value)A bitmask of supported features that the code generator supports.PluginProtos.CodeGeneratorResponse.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeFrom, newUninitializedMessageException
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<PluginProtos.CodeGeneratorResponse.Builder>
-
clear
public PluginProtos.CodeGeneratorResponse.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<PluginProtos.CodeGeneratorResponse.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<PluginProtos.CodeGeneratorResponse.Builder>
-
getDefaultInstanceForType
public PluginProtos.CodeGeneratorResponse getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public PluginProtos.CodeGeneratorResponse build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public PluginProtos.CodeGeneratorResponse buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public PluginProtos.CodeGeneratorResponse.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<PluginProtos.CodeGeneratorResponse.Builder>
-
setField
public PluginProtos.CodeGeneratorResponse.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<PluginProtos.CodeGeneratorResponse.Builder>
-
clearField
public PluginProtos.CodeGeneratorResponse.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<PluginProtos.CodeGeneratorResponse.Builder>
-
clearOneof
public PluginProtos.CodeGeneratorResponse.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<PluginProtos.CodeGeneratorResponse.Builder>
-
setRepeatedField
public PluginProtos.CodeGeneratorResponse.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<PluginProtos.CodeGeneratorResponse.Builder>
-
addRepeatedField
public PluginProtos.CodeGeneratorResponse.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<PluginProtos.CodeGeneratorResponse.Builder>
-
mergeFrom
public PluginProtos.CodeGeneratorResponse.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<PluginProtos.CodeGeneratorResponse.Builder>
-
mergeFrom
public PluginProtos.CodeGeneratorResponse.Builder mergeFrom(PluginProtos.CodeGeneratorResponse other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<PluginProtos.CodeGeneratorResponse.Builder>
-
mergeFrom
public PluginProtos.CodeGeneratorResponse.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<PluginProtos.CodeGeneratorResponse.Builder>- Throws:
java.io.IOException
-
hasError
public boolean hasError()
Error message. If non-empty, code generation failed. The plugin process should exit with status code zero even if it reports an error in this way. This should be used to indicate errors in .proto files which prevent the code generator from generating correct code. Errors which indicate a problem in protoc itself -- such as the input CodeGeneratorRequest being unparseable -- should be reported by writing a message to stderr and exiting with a non-zero status code.
optional string error = 1;- Specified by:
hasErrorin interfacePluginProtos.CodeGeneratorResponseOrBuilder- Returns:
- Whether the error field is set.
-
getError
public java.lang.String getError()
Error message. If non-empty, code generation failed. The plugin process should exit with status code zero even if it reports an error in this way. This should be used to indicate errors in .proto files which prevent the code generator from generating correct code. Errors which indicate a problem in protoc itself -- such as the input CodeGeneratorRequest being unparseable -- should be reported by writing a message to stderr and exiting with a non-zero status code.
optional string error = 1;- Specified by:
getErrorin interfacePluginProtos.CodeGeneratorResponseOrBuilder- Returns:
- The error.
-
getErrorBytes
public com.google.protobuf.ByteString getErrorBytes()
Error message. If non-empty, code generation failed. The plugin process should exit with status code zero even if it reports an error in this way. This should be used to indicate errors in .proto files which prevent the code generator from generating correct code. Errors which indicate a problem in protoc itself -- such as the input CodeGeneratorRequest being unparseable -- should be reported by writing a message to stderr and exiting with a non-zero status code.
optional string error = 1;- Specified by:
getErrorBytesin interfacePluginProtos.CodeGeneratorResponseOrBuilder- Returns:
- The bytes for error.
-
setError
public PluginProtos.CodeGeneratorResponse.Builder setError(java.lang.String value)
Error message. If non-empty, code generation failed. The plugin process should exit with status code zero even if it reports an error in this way. This should be used to indicate errors in .proto files which prevent the code generator from generating correct code. Errors which indicate a problem in protoc itself -- such as the input CodeGeneratorRequest being unparseable -- should be reported by writing a message to stderr and exiting with a non-zero status code.
optional string error = 1;- Parameters:
value- The error to set.- Returns:
- This builder for chaining.
-
clearError
public PluginProtos.CodeGeneratorResponse.Builder clearError()
Error message. If non-empty, code generation failed. The plugin process should exit with status code zero even if it reports an error in this way. This should be used to indicate errors in .proto files which prevent the code generator from generating correct code. Errors which indicate a problem in protoc itself -- such as the input CodeGeneratorRequest being unparseable -- should be reported by writing a message to stderr and exiting with a non-zero status code.
optional string error = 1;- Returns:
- This builder for chaining.
-
setErrorBytes
public PluginProtos.CodeGeneratorResponse.Builder setErrorBytes(com.google.protobuf.ByteString value)
Error message. If non-empty, code generation failed. The plugin process should exit with status code zero even if it reports an error in this way. This should be used to indicate errors in .proto files which prevent the code generator from generating correct code. Errors which indicate a problem in protoc itself -- such as the input CodeGeneratorRequest being unparseable -- should be reported by writing a message to stderr and exiting with a non-zero status code.
optional string error = 1;- Parameters:
value- The bytes for error to set.- Returns:
- This builder for chaining.
-
hasSupportedFeatures
public boolean hasSupportedFeatures()
A bitmask of supported features that the code generator supports. This is a bitwise "or" of values from the Feature enum.
optional uint64 supported_features = 2;- Specified by:
hasSupportedFeaturesin interfacePluginProtos.CodeGeneratorResponseOrBuilder- Returns:
- Whether the supportedFeatures field is set.
-
getSupportedFeatures
public long getSupportedFeatures()
A bitmask of supported features that the code generator supports. This is a bitwise "or" of values from the Feature enum.
optional uint64 supported_features = 2;- Specified by:
getSupportedFeaturesin interfacePluginProtos.CodeGeneratorResponseOrBuilder- Returns:
- The supportedFeatures.
-
setSupportedFeatures
public PluginProtos.CodeGeneratorResponse.Builder setSupportedFeatures(long value)
A bitmask of supported features that the code generator supports. This is a bitwise "or" of values from the Feature enum.
optional uint64 supported_features = 2;- Parameters:
value- The supportedFeatures to set.- Returns:
- This builder for chaining.
-
clearSupportedFeatures
public PluginProtos.CodeGeneratorResponse.Builder clearSupportedFeatures()
A bitmask of supported features that the code generator supports. This is a bitwise "or" of values from the Feature enum.
optional uint64 supported_features = 2;- Returns:
- This builder for chaining.
-
getFileList
public java.util.List<PluginProtos.CodeGeneratorResponse.File> getFileList()
repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;- Specified by:
getFileListin interfacePluginProtos.CodeGeneratorResponseOrBuilder
-
getFileCount
public int getFileCount()
repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;- Specified by:
getFileCountin interfacePluginProtos.CodeGeneratorResponseOrBuilder
-
getFile
public PluginProtos.CodeGeneratorResponse.File getFile(int index)
repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;- Specified by:
getFilein interfacePluginProtos.CodeGeneratorResponseOrBuilder
-
setFile
public PluginProtos.CodeGeneratorResponse.Builder setFile(int index, PluginProtos.CodeGeneratorResponse.File value)
repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
-
setFile
public PluginProtos.CodeGeneratorResponse.Builder setFile(int index, PluginProtos.CodeGeneratorResponse.File.Builder builderForValue)
repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
-
addFile
public PluginProtos.CodeGeneratorResponse.Builder addFile(PluginProtos.CodeGeneratorResponse.File value)
repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
-
addFile
public PluginProtos.CodeGeneratorResponse.Builder addFile(int index, PluginProtos.CodeGeneratorResponse.File value)
repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
-
addFile
public PluginProtos.CodeGeneratorResponse.Builder addFile(PluginProtos.CodeGeneratorResponse.File.Builder builderForValue)
repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
-
addFile
public PluginProtos.CodeGeneratorResponse.Builder addFile(int index, PluginProtos.CodeGeneratorResponse.File.Builder builderForValue)
repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
-
addAllFile
public PluginProtos.CodeGeneratorResponse.Builder addAllFile(java.lang.Iterable<? extends PluginProtos.CodeGeneratorResponse.File> values)
repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
-
clearFile
public PluginProtos.CodeGeneratorResponse.Builder clearFile()
repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
-
removeFile
public PluginProtos.CodeGeneratorResponse.Builder removeFile(int index)
repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
-
getFileBuilder
public PluginProtos.CodeGeneratorResponse.File.Builder getFileBuilder(int index)
repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
-
getFileOrBuilder
public PluginProtos.CodeGeneratorResponse.FileOrBuilder getFileOrBuilder(int index)
repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;- Specified by:
getFileOrBuilderin interfacePluginProtos.CodeGeneratorResponseOrBuilder
-
getFileOrBuilderList
public java.util.List<? extends PluginProtos.CodeGeneratorResponse.FileOrBuilder> getFileOrBuilderList()
repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;- Specified by:
getFileOrBuilderListin interfacePluginProtos.CodeGeneratorResponseOrBuilder
-
addFileBuilder
public PluginProtos.CodeGeneratorResponse.File.Builder addFileBuilder()
repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
-
addFileBuilder
public PluginProtos.CodeGeneratorResponse.File.Builder addFileBuilder(int index)
repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
-
getFileBuilderList
public java.util.List<PluginProtos.CodeGeneratorResponse.File.Builder> getFileBuilderList()
repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
-
setUnknownFields
public final PluginProtos.CodeGeneratorResponse.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<PluginProtos.CodeGeneratorResponse.Builder>
-
mergeUnknownFields
public final PluginProtos.CodeGeneratorResponse.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<PluginProtos.CodeGeneratorResponse.Builder>
-
-