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
,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 type
google.protobuf.compiler.CodeGeneratorResponse
-
Method Summary
Modifier and TypeMethodDescriptionaddAllFile
(Iterable<? extends PluginProtos.CodeGeneratorResponse.File> values) repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
addFile
(int index, PluginProtos.CodeGeneratorResponse.File value) repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
addFile
(int index, PluginProtos.CodeGeneratorResponse.File.Builder builderForValue) repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
addFile
(PluginProtos.CodeGeneratorResponse.File.Builder builderForValue) repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
addFileBuilder
(int index) repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
addRepeatedField
(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()
clear()
Error message.clearField
(com.google.protobuf.Descriptors.FieldDescriptor field) repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
clearOneof
(com.google.protobuf.Descriptors.OneofDescriptor oneof) A bitmask of supported features that the code generator supports.clone()
static final com.google.protobuf.Descriptors.Descriptor
com.google.protobuf.Descriptors.Descriptor
getError()
Error message.com.google.protobuf.ByteString
Error message.getFile
(int index) repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
getFileBuilder
(int index) repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
int
repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
getFileOrBuilder
(int index) repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
long
A bitmask of supported features that the code generator supports.boolean
hasError()
Error message.boolean
A bitmask of supported features that the code generator supports.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
final boolean
mergeFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom
(com.google.protobuf.Message other) mergeUnknownFields
(com.google.protobuf.UnknownFieldSet unknownFields) removeFile
(int index) repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
Error message.setErrorBytes
(com.google.protobuf.ByteString value) Error message.setFile
(int index, PluginProtos.CodeGeneratorResponse.File value) repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
setFile
(int index, PluginProtos.CodeGeneratorResponse.File.Builder builderForValue) repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
setRepeatedField
(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) setSupportedFeatures
(long value) A bitmask of supported features that the code generator supports.setUnknownFields
(com.google.protobuf.UnknownFieldSet unknownFields) Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, 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
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFrom
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<PluginProtos.CodeGeneratorResponse.Builder>
-
clear
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<PluginProtos.CodeGeneratorResponse.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<PluginProtos.CodeGeneratorResponse.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<PluginProtos.CodeGeneratorResponse.Builder>
-
setField
public PluginProtos.CodeGeneratorResponse.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<PluginProtos.CodeGeneratorResponse.Builder>
-
clearField
public PluginProtos.CodeGeneratorResponse.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) - Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<PluginProtos.CodeGeneratorResponse.Builder>
-
clearOneof
public PluginProtos.CodeGeneratorResponse.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) - Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<PluginProtos.CodeGeneratorResponse.Builder>
-
setRepeatedField
public PluginProtos.CodeGeneratorResponse.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<PluginProtos.CodeGeneratorResponse.Builder>
-
addRepeatedField
public PluginProtos.CodeGeneratorResponse.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<PluginProtos.CodeGeneratorResponse.Builder>
-
mergeFrom
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<PluginProtos.CodeGeneratorResponse.Builder>
-
mergeFrom
public PluginProtos.CodeGeneratorResponse.Builder mergeFrom(PluginProtos.CodeGeneratorResponse other) -
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in 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 IOException - Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<PluginProtos.CodeGeneratorResponse.Builder>
- Throws:
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:
hasError
in interfacePluginProtos.CodeGeneratorResponseOrBuilder
- Returns:
- Whether the error field is set.
-
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:
getError
in 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:
getErrorBytes
in interfacePluginProtos.CodeGeneratorResponseOrBuilder
- Returns:
- The bytes for error.
-
setError
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
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:
hasSupportedFeatures
in 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:
getSupportedFeatures
in interfacePluginProtos.CodeGeneratorResponseOrBuilder
- Returns:
- The supportedFeatures.
-
setSupportedFeatures
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
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
repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
- Specified by:
getFileList
in interfacePluginProtos.CodeGeneratorResponseOrBuilder
-
getFileCount
public int getFileCount()repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
- Specified by:
getFileCount
in interfacePluginProtos.CodeGeneratorResponseOrBuilder
-
getFile
repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
- Specified by:
getFile
in 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(Iterable<? extends PluginProtos.CodeGeneratorResponse.File> values) repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
-
clearFile
repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
-
removeFile
repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
-
getFileBuilder
repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
-
getFileOrBuilder
repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
- Specified by:
getFileOrBuilder
in interfacePluginProtos.CodeGeneratorResponseOrBuilder
-
getFileOrBuilderList
repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
- Specified by:
getFileOrBuilderList
in interfacePluginProtos.CodeGeneratorResponseOrBuilder
-
addFileBuilder
repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
-
addFileBuilder
repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
-
getFileBuilderList
repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
-
setUnknownFields
public final PluginProtos.CodeGeneratorResponse.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<PluginProtos.CodeGeneratorResponse.Builder>
-
mergeUnknownFields
public final PluginProtos.CodeGeneratorResponse.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<PluginProtos.CodeGeneratorResponse.Builder>
-