public static final class PluginProtos.CodeGeneratorRequest extends GeneratedMessageLite<PluginProtos.CodeGeneratorRequest,PluginProtos.CodeGeneratorRequest.Builder> implements PluginProtos.CodeGeneratorRequestOrBuilder
An encoded CodeGeneratorRequest is written to the plugin's stdin.Protobuf type
google.protobuf.compiler.CodeGeneratorRequest
Modifier and Type | Class and Description |
---|---|
static class |
PluginProtos.CodeGeneratorRequest.Builder
An encoded CodeGeneratorRequest is written to the plugin's stdin.
|
GeneratedMessageLite.DefaultInstanceBasedParser<T extends GeneratedMessageLite<T,?>>, GeneratedMessageLite.ExtendableBuilder<MessageType extends GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, GeneratedMessageLite.ExtendableMessage<MessageType extends GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType extends GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, GeneratedMessageLite.GeneratedExtension<ContainingType extends MessageLite,Type>, GeneratedMessageLite.MergeFromVisitor, GeneratedMessageLite.MethodToInvoke, GeneratedMessageLite.SerializedForm, GeneratedMessageLite.Visitor
Modifier and Type | Field and Description |
---|---|
static int |
FILE_TO_GENERATE_FIELD_NUMBER |
static int |
PARAMETER_FIELD_NUMBER |
static int |
PROTO_FILE_FIELD_NUMBER |
memoizedSerializedSize, unknownFields
memoizedHashCode
Modifier and Type | Method and Description |
---|---|
protected Object |
dynamicMethod(GeneratedMessageLite.MethodToInvoke method,
Object arg0,
Object arg1)
A method that implements different types of operations described in
GeneratedMessageLite.MethodToInvoke . |
static PluginProtos.CodeGeneratorRequest |
getDefaultInstance() |
String |
getFileToGenerate(int index)
The .proto files that were explicitly listed on the command-line.
|
ByteString |
getFileToGenerateBytes(int index)
The .proto files that were explicitly listed on the command-line.
|
int |
getFileToGenerateCount()
The .proto files that were explicitly listed on the command-line.
|
List<String> |
getFileToGenerateList()
The .proto files that were explicitly listed on the command-line.
|
String |
getParameter()
The generator parameter passed on the command-line.
|
ByteString |
getParameterBytes()
The generator parameter passed on the command-line.
|
DescriptorProtos.FileDescriptorProto |
getProtoFile(int index)
FileDescriptorProtos for all files in files_to_generate and everything
they import.
|
int |
getProtoFileCount()
FileDescriptorProtos for all files in files_to_generate and everything
they import.
|
List<DescriptorProtos.FileDescriptorProto> |
getProtoFileList()
FileDescriptorProtos for all files in files_to_generate and everything
they import.
|
DescriptorProtos.FileDescriptorProtoOrBuilder |
getProtoFileOrBuilder(int index)
FileDescriptorProtos for all files in files_to_generate and everything
they import.
|
List<? extends DescriptorProtos.FileDescriptorProtoOrBuilder> |
getProtoFileOrBuilderList()
FileDescriptorProtos for all files in files_to_generate and everything
they import.
|
int |
getSerializedSize()
Get the number of bytes required to encode this message.
|
boolean |
hasParameter()
The generator parameter passed on the command-line.
|
static PluginProtos.CodeGeneratorRequest.Builder |
newBuilder() |
static PluginProtos.CodeGeneratorRequest.Builder |
newBuilder(PluginProtos.CodeGeneratorRequest prototype) |
static PluginProtos.CodeGeneratorRequest |
parseDelimitedFrom(InputStream input) |
static PluginProtos.CodeGeneratorRequest |
parseDelimitedFrom(InputStream input,
ExtensionRegistryLite extensionRegistry) |
static PluginProtos.CodeGeneratorRequest |
parseFrom(byte[] data) |
static PluginProtos.CodeGeneratorRequest |
parseFrom(byte[] data,
ExtensionRegistryLite extensionRegistry) |
static PluginProtos.CodeGeneratorRequest |
parseFrom(ByteString data) |
static PluginProtos.CodeGeneratorRequest |
parseFrom(ByteString data,
ExtensionRegistryLite extensionRegistry) |
static PluginProtos.CodeGeneratorRequest |
parseFrom(CodedInputStream input) |
static PluginProtos.CodeGeneratorRequest |
parseFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry) |
static PluginProtos.CodeGeneratorRequest |
parseFrom(InputStream input) |
static PluginProtos.CodeGeneratorRequest |
parseFrom(InputStream input,
ExtensionRegistryLite extensionRegistry) |
static Parser<PluginProtos.CodeGeneratorRequest> |
parser() |
void |
writeTo(CodedOutputStream output)
Serializes the message and writes it to
output . |
dynamicMethod, dynamicMethod, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, emptyProtobufList, equals, getDefaultInstanceForType, getParserForType, hashCode, isInitialized, isInitialized, makeImmutable, makeImmutable, mergeLengthDelimitedField, mergeUnknownFields, mergeVarintField, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBuilderForType, newRepeatedGeneratedExtension, newSingularGeneratedExtension, parseDelimitedFrom, parseDelimitedFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parsePartialFrom, parseUnknownField, toBuilder, toString
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getDefaultInstanceForType, isInitialized
public static final int FILE_TO_GENERATE_FIELD_NUMBER
public static final int PARAMETER_FIELD_NUMBER
public static final int PROTO_FILE_FIELD_NUMBER
public List<String> getFileToGenerateList()
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.
repeated string file_to_generate = 1;
getFileToGenerateList
in interface PluginProtos.CodeGeneratorRequestOrBuilder
public int getFileToGenerateCount()
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.
repeated string file_to_generate = 1;
getFileToGenerateCount
in interface PluginProtos.CodeGeneratorRequestOrBuilder
public String getFileToGenerate(int index)
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.
repeated string file_to_generate = 1;
getFileToGenerate
in interface PluginProtos.CodeGeneratorRequestOrBuilder
public ByteString getFileToGenerateBytes(int index)
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.
repeated string file_to_generate = 1;
getFileToGenerateBytes
in interface PluginProtos.CodeGeneratorRequestOrBuilder
public boolean hasParameter()
The generator parameter passed on the command-line.
optional string parameter = 2;
hasParameter
in interface PluginProtos.CodeGeneratorRequestOrBuilder
public String getParameter()
The generator parameter passed on the command-line.
optional string parameter = 2;
getParameter
in interface PluginProtos.CodeGeneratorRequestOrBuilder
public ByteString getParameterBytes()
The generator parameter passed on the command-line.
optional string parameter = 2;
getParameterBytes
in interface PluginProtos.CodeGeneratorRequestOrBuilder
public List<DescriptorProtos.FileDescriptorProto> getProtoFileList()
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.
repeated .google.protobuf.FileDescriptorProto proto_file = 15;
getProtoFileList
in interface PluginProtos.CodeGeneratorRequestOrBuilder
public List<? extends DescriptorProtos.FileDescriptorProtoOrBuilder> getProtoFileOrBuilderList()
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.
repeated .google.protobuf.FileDescriptorProto proto_file = 15;
public int getProtoFileCount()
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.
repeated .google.protobuf.FileDescriptorProto proto_file = 15;
getProtoFileCount
in interface PluginProtos.CodeGeneratorRequestOrBuilder
public DescriptorProtos.FileDescriptorProto getProtoFile(int index)
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.
repeated .google.protobuf.FileDescriptorProto proto_file = 15;
getProtoFile
in interface PluginProtos.CodeGeneratorRequestOrBuilder
public DescriptorProtos.FileDescriptorProtoOrBuilder getProtoFileOrBuilder(int index)
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.
repeated .google.protobuf.FileDescriptorProto proto_file = 15;
public void writeTo(CodedOutputStream output) throws IOException
MessageLite
output
. This does not
flush or close the stream.writeTo
in interface MessageLite
IOException
public int getSerializedSize()
MessageLite
getSerializedSize
in interface MessageLite
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 static PluginProtos.CodeGeneratorRequest.Builder newBuilder()
public static PluginProtos.CodeGeneratorRequest.Builder newBuilder(PluginProtos.CodeGeneratorRequest prototype)
protected final Object dynamicMethod(GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1)
GeneratedMessageLite
GeneratedMessageLite.MethodToInvoke
.
Theses different kinds of operations are required to implement message-level operations for
builders in the runtime. This method bundles those operations to reduce the generated methods
count.
MERGE_FROM_STREAM
is parameterized with an CodedInputStream
and
ExtensionRegistryLite
. It consumes the input stream, parsing the contents into the
returned protocol buffer. If parsing throws an InvalidProtocolBufferException
, the
implementation wraps it in a RuntimeException.
NEW_INSTANCE
returns a new instance of the protocol buffer that has not yet been
made immutable. See MAKE_IMMUTABLE
.
IS_INITIALIZED
is parameterized with a Boolean
detailing whether to
memoize. It returns null
for false and the default instance for true. We optionally
memoize to support the Builder case, where memoization is not desired.
NEW_BUILDER
returns a BuilderType
instance.
VISIT
is parameterized with a Visitor
and a MessageType
and
recursively iterates through the fields side by side between this and the instance.
MAKE_IMMUTABLE
sets all internal fields to an immutable state.
For use by generated code only.
dynamicMethod
in class GeneratedMessageLite<PluginProtos.CodeGeneratorRequest,PluginProtos.CodeGeneratorRequest.Builder>
public static PluginProtos.CodeGeneratorRequest getDefaultInstance()
public static Parser<PluginProtos.CodeGeneratorRequest> parser()
Copyright © 2008–2016 Google. All rights reserved.