Package com.google.protobuf.compiler
Class PluginProtos.CodeGeneratorResponse.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<MessageType,BuilderType>
com.google.protobuf.GeneratedMessageLite.Builder<PluginProtos.CodeGeneratorResponse,PluginProtos.CodeGeneratorResponse.Builder>
com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.Builder
- All Implemented Interfaces:
PluginProtos.CodeGeneratorResponseOrBuilder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,Cloneable
- Enclosing class:
- PluginProtos.CodeGeneratorResponse
public static final class PluginProtos.CodeGeneratorResponse.Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<PluginProtos.CodeGeneratorResponse,PluginProtos.CodeGeneratorResponse.Builder>
implements PluginProtos.CodeGeneratorResponseOrBuilder
The plugin writes an encoded CodeGeneratorResponse to stdout.Protobuf type
google.protobuf.compiler.CodeGeneratorResponse-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance -
Method Summary
Modifier and TypeMethodDescriptionaddAllFile(Iterable<? extends PluginProtos.CodeGeneratorResponse.File> values) repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15 [json_name = "file"];addFile(int index, PluginProtos.CodeGeneratorResponse.File value) repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15 [json_name = "file"];addFile(int index, PluginProtos.CodeGeneratorResponse.File.Builder builderForValue) repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15 [json_name = "file"];repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15 [json_name = "file"];addFile(PluginProtos.CodeGeneratorResponse.File.Builder builderForValue) repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15 [json_name = "file"];Error message.repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15 [json_name = "file"];A bitmask of supported features that the code generator supports.getError()Error message.com.google.protobuf.ByteStringError message.getFile(int index) repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15 [json_name = "file"];intrepeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15 [json_name = "file"];repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15 [json_name = "file"];longA bitmask of supported features that the code generator supports.booleanhasError()Error message.booleanA bitmask of supported features that the code generator supports.removeFile(int index) repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15 [json_name = "file"];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 [json_name = "file"];setFile(int index, PluginProtos.CodeGeneratorResponse.File.Builder builderForValue) repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15 [json_name = "file"];setSupportedFeatures(long value) A bitmask of supported features that the code generator supports.Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFromMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Method Details
-
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 [json_name = "error"];- Specified by:
hasErrorin 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 [json_name = "error"];- 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 [json_name = "error"];- Specified by:
getErrorBytesin 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 [json_name = "error"];- 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 [json_name = "error"];- 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 [json_name = "error"];- 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 [json_name = "supportedFeatures"];- 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 [json_name = "supportedFeatures"];- Specified by:
getSupportedFeaturesin 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 [json_name = "supportedFeatures"];- 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 [json_name = "supportedFeatures"];- Returns:
- This builder for chaining.
-
getFileList
repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15 [json_name = "file"];- Specified by:
getFileListin interfacePluginProtos.CodeGeneratorResponseOrBuilder
-
getFileCount
public int getFileCount()repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15 [json_name = "file"];- Specified by:
getFileCountin interfacePluginProtos.CodeGeneratorResponseOrBuilder
-
getFile
repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15 [json_name = "file"];- 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 [json_name = "file"]; -
setFile
public PluginProtos.CodeGeneratorResponse.Builder setFile(int index, PluginProtos.CodeGeneratorResponse.File.Builder builderForValue) repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15 [json_name = "file"]; -
addFile
public PluginProtos.CodeGeneratorResponse.Builder addFile(PluginProtos.CodeGeneratorResponse.File value) repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15 [json_name = "file"]; -
addFile
public PluginProtos.CodeGeneratorResponse.Builder addFile(int index, PluginProtos.CodeGeneratorResponse.File value) repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15 [json_name = "file"]; -
addFile
public PluginProtos.CodeGeneratorResponse.Builder addFile(PluginProtos.CodeGeneratorResponse.File.Builder builderForValue) repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15 [json_name = "file"]; -
addFile
public PluginProtos.CodeGeneratorResponse.Builder addFile(int index, PluginProtos.CodeGeneratorResponse.File.Builder builderForValue) repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15 [json_name = "file"]; -
addAllFile
public PluginProtos.CodeGeneratorResponse.Builder addAllFile(Iterable<? extends PluginProtos.CodeGeneratorResponse.File> values) repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15 [json_name = "file"]; -
clearFile
repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15 [json_name = "file"]; -
removeFile
repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15 [json_name = "file"];
-