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, unknownFields
memoizedSize
memoizedHashCode
computeStringSize, computeStringSizeNoTag, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, newFileScopedGeneratedExtension, newFileScopedGeneratedExtension, newMessageScopedGeneratedExtension, newMessageScopedGeneratedExtension, parseUnknownField, writeReplace, writeString, writeStringNoTag
equals, findInitializationErrors, getInitializationErrorString, hashCode, hashFields, toString
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof
toByteArray, toByteString, writeDelimitedTo, writeTo
public 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()
MessageOrBuilder
UnknownFieldSet
for this message.getUnknownFields
in interface MessageOrBuilder
getUnknownFields
in class GeneratedMessage
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
GeneratedMessage
internalGetFieldAccessorTable
in class GeneratedMessage
public 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.CodeGeneratorRequestOrBuilder
public 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.CodeGeneratorRequestOrBuilder
public 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.CodeGeneratorRequestOrBuilder
public 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.CodeGeneratorRequestOrBuilder
public boolean hasParameter()
optional string parameter = 2;
The generator parameter passed on the command-line.
hasParameter
in interface PluginProtos.CodeGeneratorRequestOrBuilder
public String getParameter()
optional string parameter = 2;
The generator parameter passed on the command-line.
getParameter
in interface PluginProtos.CodeGeneratorRequestOrBuilder
public ByteString getParameterBytes()
optional string parameter = 2;
The generator parameter passed on the command-line.
getParameterBytes
in interface PluginProtos.CodeGeneratorRequestOrBuilder
public 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.CodeGeneratorRequestOrBuilder
public 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.CodeGeneratorRequestOrBuilder
public 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.CodeGeneratorRequestOrBuilder
public 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.CodeGeneratorRequestOrBuilder
public 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.CodeGeneratorRequestOrBuilder
public final boolean isInitialized()
MessageLiteOrBuilder
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessage
public void writeTo(CodedOutputStream output) throws IOException
MessageLite
output
. This does not
flush or close the stream.writeTo
in interface MessageLite
writeTo
in class GeneratedMessage
IOException
public int getSerializedSize()
MessageLite
getSerializedSize
in interface MessageLite
getSerializedSize
in class GeneratedMessage
public static PluginProtos.CodeGeneratorRequest parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static PluginProtos.CodeGeneratorRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static PluginProtos.CodeGeneratorRequest parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static PluginProtos.CodeGeneratorRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static PluginProtos.CodeGeneratorRequest parseFrom(InputStream input) throws IOException
IOException
public static PluginProtos.CodeGeneratorRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static PluginProtos.CodeGeneratorRequest parseDelimitedFrom(InputStream input) throws IOException
IOException
public static PluginProtos.CodeGeneratorRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static PluginProtos.CodeGeneratorRequest parseFrom(CodedInputStream input) throws IOException
IOException
public static PluginProtos.CodeGeneratorRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public PluginProtos.CodeGeneratorRequest.Builder newBuilderForType()
MessageLite
newBuilderForType
in interface Message
newBuilderForType
in interface MessageLite
public static PluginProtos.CodeGeneratorRequest.Builder newBuilder()
public static PluginProtos.CodeGeneratorRequest.Builder newBuilder(PluginProtos.CodeGeneratorRequest prototype)
public PluginProtos.CodeGeneratorRequest.Builder toBuilder()
MessageLite
toBuilder
in interface Message
toBuilder
in interface MessageLite
protected PluginProtos.CodeGeneratorRequest.Builder newBuilderForType(GeneratedMessage.BuilderParent parent)
newBuilderForType
in class GeneratedMessage
public static PluginProtos.CodeGeneratorRequest getDefaultInstance()
public static Parser<PluginProtos.CodeGeneratorRequest> parser()
public Parser<PluginProtos.CodeGeneratorRequest> getParserForType()
MessageLite
getParserForType
in interface Message
getParserForType
in interface MessageLite
getParserForType
in class GeneratedMessage
public PluginProtos.CodeGeneratorRequest getDefaultInstanceForType()
MessageLiteOrBuilder
getDefaultInstance()
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 MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
Copyright © 2008–2016 Google. All rights reserved.