public static final class PluginProtos.CodeGeneratorRequest extends GeneratedMessage implements PluginProtos.CodeGeneratorRequestOrBuilder
google.protobuf.compiler.CodeGeneratorRequest
An encoded CodeGeneratorRequest is written to the plugin's stdin.
| Modifier and Type | Class and Description |
|---|---|
static class |
PluginProtos.CodeGeneratorRequest.Builder
Protobuf type
google.protobuf.compiler.CodeGeneratorRequest |
GeneratedMessage.BuilderParent, GeneratedMessage.ExtendableBuilder<MessageType extends GeneratedMessage.ExtendableMessage,BuilderType extends GeneratedMessage.ExtendableBuilder>, GeneratedMessage.ExtendableMessage<MessageType extends GeneratedMessage.ExtendableMessage>, GeneratedMessage.ExtendableMessageOrBuilder<MessageType extends GeneratedMessage.ExtendableMessage>, GeneratedMessage.FieldAccessorTable, GeneratedMessage.GeneratedExtension<ContainingType extends Message,Type>| Modifier and Type | Field and Description |
|---|---|
static int |
FILE_TO_GENERATE_FIELD_NUMBER |
static int |
PARAMETER_FIELD_NUMBER |
static Parser<PluginProtos.CodeGeneratorRequest> |
PARSER
Deprecated.
|
static int |
PROTO_FILE_FIELD_NUMBER |
alwaysUseFieldBuilders, unknownFieldsmemoizedSizememoizedHashCodecomputeStringSize, computeStringSizeNoTag, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, newFileScopedGeneratedExtension, newFileScopedGeneratedExtension, newMessageScopedGeneratedExtension, newMessageScopedGeneratedExtension, parseUnknownField, writeReplace, writeString, writeStringNoTagequals, findInitializationErrors, getInitializationErrorString, hashCode, hashFields, toStringaddAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitfindInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneoftoByteArray, toByteString, writeDelimitedTo, writeTopublic static final int FILE_TO_GENERATE_FIELD_NUMBER
public static final int PARAMETER_FIELD_NUMBER
public static final int PROTO_FILE_FIELD_NUMBER
@Deprecated public static final Parser<PluginProtos.CodeGeneratorRequest> PARSER
public final UnknownFieldSet getUnknownFields()
MessageOrBuilderUnknownFieldSet for this message.getUnknownFields in interface MessageOrBuildergetUnknownFields in class GeneratedMessagepublic static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
GeneratedMessageinternalGetFieldAccessorTable in class GeneratedMessagepublic ProtocolStringList getFileToGenerateList()
repeated string file_to_generate = 1;
The .proto files that were explicitly listed on the command-line. The code generator should generate code only for these files. Each file's descriptor will be included in proto_file, below.
getFileToGenerateList in interface PluginProtos.CodeGeneratorRequestOrBuilderpublic int getFileToGenerateCount()
repeated string file_to_generate = 1;
The .proto files that were explicitly listed on the command-line. The code generator should generate code only for these files. Each file's descriptor will be included in proto_file, below.
getFileToGenerateCount in interface PluginProtos.CodeGeneratorRequestOrBuilderpublic String getFileToGenerate(int index)
repeated string file_to_generate = 1;
The .proto files that were explicitly listed on the command-line. The code generator should generate code only for these files. Each file's descriptor will be included in proto_file, below.
getFileToGenerate in interface PluginProtos.CodeGeneratorRequestOrBuilderpublic ByteString getFileToGenerateBytes(int index)
repeated string file_to_generate = 1;
The .proto files that were explicitly listed on the command-line. The code generator should generate code only for these files. Each file's descriptor will be included in proto_file, below.
getFileToGenerateBytes in interface PluginProtos.CodeGeneratorRequestOrBuilderpublic boolean hasParameter()
optional string parameter = 2;
The generator parameter passed on the command-line.
hasParameter in interface PluginProtos.CodeGeneratorRequestOrBuilderpublic String getParameter()
optional string parameter = 2;
The generator parameter passed on the command-line.
getParameter in interface PluginProtos.CodeGeneratorRequestOrBuilderpublic ByteString getParameterBytes()
optional string parameter = 2;
The generator parameter passed on the command-line.
getParameterBytes in interface PluginProtos.CodeGeneratorRequestOrBuilderpublic List<DescriptorProtos.FileDescriptorProto> getProtoFileList()
repeated .google.protobuf.FileDescriptorProto proto_file = 15;
FileDescriptorProtos for all files in files_to_generate and everything they import. The files will appear in topological order, so each file appears before any file that imports it. protoc guarantees that all proto_files will be written after the fields above, even though this is not technically guaranteed by the protobuf wire format. This theoretically could allow a plugin to stream in the FileDescriptorProtos and handle them one by one rather than read the entire set into memory at once. However, as of this writing, this is not similarly optimized on protoc's end -- it will store all fields in memory at once before sending them to the plugin.
getProtoFileList in interface PluginProtos.CodeGeneratorRequestOrBuilderpublic List<? extends DescriptorProtos.FileDescriptorProtoOrBuilder> getProtoFileOrBuilderList()
repeated .google.protobuf.FileDescriptorProto proto_file = 15;
FileDescriptorProtos for all files in files_to_generate and everything they import. The files will appear in topological order, so each file appears before any file that imports it. protoc guarantees that all proto_files will be written after the fields above, even though this is not technically guaranteed by the protobuf wire format. This theoretically could allow a plugin to stream in the FileDescriptorProtos and handle them one by one rather than read the entire set into memory at once. However, as of this writing, this is not similarly optimized on protoc's end -- it will store all fields in memory at once before sending them to the plugin.
getProtoFileOrBuilderList in interface PluginProtos.CodeGeneratorRequestOrBuilderpublic int getProtoFileCount()
repeated .google.protobuf.FileDescriptorProto proto_file = 15;
FileDescriptorProtos for all files in files_to_generate and everything they import. The files will appear in topological order, so each file appears before any file that imports it. protoc guarantees that all proto_files will be written after the fields above, even though this is not technically guaranteed by the protobuf wire format. This theoretically could allow a plugin to stream in the FileDescriptorProtos and handle them one by one rather than read the entire set into memory at once. However, as of this writing, this is not similarly optimized on protoc's end -- it will store all fields in memory at once before sending them to the plugin.
getProtoFileCount in interface PluginProtos.CodeGeneratorRequestOrBuilderpublic DescriptorProtos.FileDescriptorProto getProtoFile(int index)
repeated .google.protobuf.FileDescriptorProto proto_file = 15;
FileDescriptorProtos for all files in files_to_generate and everything they import. The files will appear in topological order, so each file appears before any file that imports it. protoc guarantees that all proto_files will be written after the fields above, even though this is not technically guaranteed by the protobuf wire format. This theoretically could allow a plugin to stream in the FileDescriptorProtos and handle them one by one rather than read the entire set into memory at once. However, as of this writing, this is not similarly optimized on protoc's end -- it will store all fields in memory at once before sending them to the plugin.
getProtoFile in interface PluginProtos.CodeGeneratorRequestOrBuilderpublic DescriptorProtos.FileDescriptorProtoOrBuilder getProtoFileOrBuilder(int index)
repeated .google.protobuf.FileDescriptorProto proto_file = 15;
FileDescriptorProtos for all files in files_to_generate and everything they import. The files will appear in topological order, so each file appears before any file that imports it. protoc guarantees that all proto_files will be written after the fields above, even though this is not technically guaranteed by the protobuf wire format. This theoretically could allow a plugin to stream in the FileDescriptorProtos and handle them one by one rather than read the entire set into memory at once. However, as of this writing, this is not similarly optimized on protoc's end -- it will store all fields in memory at once before sending them to the plugin.
getProtoFileOrBuilder in interface PluginProtos.CodeGeneratorRequestOrBuilderpublic final boolean isInitialized()
MessageLiteOrBuilderisInitialized in interface MessageLiteOrBuilderisInitialized in class GeneratedMessagepublic void writeTo(CodedOutputStream output) throws IOException
MessageLiteoutput. This does not
flush or close the stream.writeTo in interface MessageLitewriteTo in class GeneratedMessageIOExceptionpublic int getSerializedSize()
MessageLitegetSerializedSize in interface MessageLitegetSerializedSize in class GeneratedMessagepublic static PluginProtos.CodeGeneratorRequest parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static PluginProtos.CodeGeneratorRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static PluginProtos.CodeGeneratorRequest parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static PluginProtos.CodeGeneratorRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static PluginProtos.CodeGeneratorRequest parseFrom(InputStream input) throws IOException
IOExceptionpublic static PluginProtos.CodeGeneratorRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static PluginProtos.CodeGeneratorRequest parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static PluginProtos.CodeGeneratorRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static PluginProtos.CodeGeneratorRequest parseFrom(CodedInputStream input) throws IOException
IOExceptionpublic static PluginProtos.CodeGeneratorRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic PluginProtos.CodeGeneratorRequest.Builder newBuilderForType()
MessageLitenewBuilderForType in interface MessagenewBuilderForType in interface MessageLitepublic static PluginProtos.CodeGeneratorRequest.Builder newBuilder()
public static PluginProtos.CodeGeneratorRequest.Builder newBuilder(PluginProtos.CodeGeneratorRequest prototype)
public PluginProtos.CodeGeneratorRequest.Builder toBuilder()
MessageLitetoBuilder in interface MessagetoBuilder in interface MessageLiteprotected PluginProtos.CodeGeneratorRequest.Builder newBuilderForType(GeneratedMessage.BuilderParent parent)
newBuilderForType in class GeneratedMessagepublic static PluginProtos.CodeGeneratorRequest getDefaultInstance()
public static Parser<PluginProtos.CodeGeneratorRequest> parser()
public Parser<PluginProtos.CodeGeneratorRequest> getParserForType()
MessageLitegetParserForType in interface MessagegetParserForType in interface MessageLitegetParserForType in class GeneratedMessagepublic PluginProtos.CodeGeneratorRequest getDefaultInstanceForType()
MessageLiteOrBuildergetDefaultInstance() method of generated message classes in that
this method is an abstract method of the MessageLite interface
whereas getDefaultInstance() is a static method of a specific
class. They return the same thing.getDefaultInstanceForType in interface MessageLiteOrBuildergetDefaultInstanceForType in interface MessageOrBuilderCopyright © 2008–2016 Google. All rights reserved.