Constructor and Description |
---|
Builder(String executable)
Constructs a new builder.
|
Modifier and Type | Method and Description |
---|---|
Protoc.Builder |
addPlugin(ProtocPlugin plugin)
Adds a protoc plugin definition for custom code generation.
|
Protoc.Builder |
addProtoFile(File protoFile)
Adds a proto file to be compiled.
|
Protoc.Builder |
addProtoFiles(Iterable<File> protoFiles)
Adds a collection of proto files to be compiled.
|
Protoc.Builder |
addProtoPathElement(File protopathElement)
Adds the
protopathElement to the protopath. |
Protoc.Builder |
addProtoPathElements(Iterable<File> protopathElements)
Adds a number of elements to the protopath.
|
Protoc |
build()
Builds and returns a fully configured instance of
Protoc wrapper. |
Protoc.Builder |
setCppOutputDirectory(File cppOutputDirectory)
Sets the directory into which C++ source files will be generated.
|
Protoc.Builder |
setCsharpOutputDirectory(File csharpOutputDirectory)
Sets the directory into which C# source files will be generated.
|
Protoc.Builder |
setCustomOutputDirectory(File customOutputDirectory)
Sets the directory into which a custom protoc plugin will generate files.
|
Protoc.Builder |
setJavaNanoOutputDirectory(File javaNanoOutputDirectory)
Sets the directory into which JavaNano source files will be generated.
|
Protoc.Builder |
setJavaOutputDirectory(File javaOutputDirectory)
Sets the directory into which Java source files will be generated.
|
Protoc.Builder |
setJavaScriptOutputDirectory(File javaScriptOutputDirectory)
Sets the directory into which JavaScript source files will be generated.
|
Protoc.Builder |
setNativePluginExecutable(String nativePluginExecutable) |
Protoc.Builder |
setNativePluginId(String nativePluginId) |
Protoc.Builder |
setNativePluginParameter(String nativePluginParameter) |
Protoc.Builder |
setPluginDirectory(File pluginDirectory) |
Protoc.Builder |
setPythonOutputDirectory(File pythonOutputDirectory)
Sets the directory into which Python source files will be generated.
|
Protoc.Builder |
setTempDirectory(File tempDirectory) |
Protoc.Builder |
useArgumentFile(boolean useArgumentFile) |
Protoc.Builder |
withDescriptorSetFile(File descriptorSetFile,
boolean includeImports,
boolean includeSourceInfoInDescriptorSet) |
Builder(String executable)
executable
- The path to the protoc
executable.public Protoc.Builder setTempDirectory(File tempDirectory)
public Protoc.Builder setJavaOutputDirectory(File javaOutputDirectory)
javaOutputDirectory
- a directory into which Java source files will be generated.public Protoc.Builder setJavaNanoOutputDirectory(File javaNanoOutputDirectory)
javaNanoOutputDirectory
- a directory into which Java source files will be generated.public Protoc.Builder setCppOutputDirectory(File cppOutputDirectory)
cppOutputDirectory
- a directory into which C++ source files will be generated.public Protoc.Builder setPythonOutputDirectory(File pythonOutputDirectory)
pythonOutputDirectory
- a directory into which Python source files will be generated.public Protoc.Builder setCsharpOutputDirectory(File csharpOutputDirectory)
csharpOutputDirectory
- a directory into which C# source files will be generated.public Protoc.Builder setJavaScriptOutputDirectory(File javaScriptOutputDirectory)
javaScriptOutputDirectory
- a directory into which JavaScript source files will be generated.public Protoc.Builder setCustomOutputDirectory(File customOutputDirectory)
customOutputDirectory
- a directory into which a custom protoc plugin will generate files.public Protoc.Builder addProtoFile(File protoFile)
protoFile
- source protobuf definitions file.public Protoc.Builder addPlugin(ProtocPlugin plugin)
plugin
- plugin definitionpublic Protoc.Builder setPluginDirectory(File pluginDirectory)
public Protoc.Builder setNativePluginId(String nativePluginId)
public Protoc.Builder setNativePluginExecutable(String nativePluginExecutable)
public Protoc.Builder setNativePluginParameter(String nativePluginParameter)
public Protoc.Builder withDescriptorSetFile(File descriptorSetFile, boolean includeImports, boolean includeSourceInfoInDescriptorSet)
public Protoc.Builder useArgumentFile(boolean useArgumentFile)
public Protoc.Builder addProtoFiles(Iterable<File> protoFiles)
protoFiles
- a collection of source protobuf definition files.addProtoFile(File)
public Protoc.Builder addProtoPathElement(File protopathElement)
protopathElement
to the protopath.protopathElement
- A directory to be searched for imported protocol buffer definitions.public Protoc.Builder addProtoPathElements(Iterable<File> protopathElements)
protopathElements
- directories to be searched for imported protocol buffer definitions.addProtoPathElement(File)
Copyright © 2016–2018 Maven Protocol Buffers Plugin Authors. All rights reserved.