Class ImmutableGenerationRequest
java.lang.Object
io.github.ascopes.protobufmavenplugin.generation.ImmutableGenerationRequest
- All Implemented Interfaces:
GenerationRequest
@Generated(from="GenerationRequest",
generator="Immutables")
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableGenerationRequest
extends Object
implements GenerationRequest
Immutable implementation of
GenerationRequest.
Use the builder to create immutable instances:
ImmutableGenerationRequest.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableGenerationRequest. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableGenerationRequest.booleanThis instance is equal to all instances ofImmutableGenerationRequestthat have equal attribute values.Additional arguments to pass toprotoc.@Nullable Collection<? extends MavenProtocPlugin> Binaryprotocplugins that should be resolved from Maven repositories.@Nullable Collection<? extends PathProtocPlugin> Binaryprotocplugins that should be resolved from the system$PATH.@Nullable Collection<? extends UriProtocPlugin> Binaryprotocplugins that should be resolved from URLs.@Nullable DependencyResolutionDepthThe preference for how to resolve transitive dependencies by default.The dependency scopes to allow when searching the Maven project dependency list for*.protofiles.@Nullable Collection<Language> The collection of supported langagues to enable inprotoc.Additional environment variables to set when callingprotoc.The collection of*.protopath patterns to exclude from being passed toprotoc.@Nullable Collection<? extends MavenArtifact> Additional user-defined Maven dependencies to include in theprotocimport path.@Nullable Collection<Path> Additional user-defined paths relative to the project root to include in theprotocimport path.The collection of*.protopath patterns to include to be passed toprotoc.@Nullable Collection<? extends MavenProtocPlugin> Java executable projects that satisfy theprotocplugin interface to wrap in bootstrapping scripts and pass toprotoc.@Nullable StringThe Maven artifact classifier to use when attaching theprotobindescriptor file to the Maven project.@Nullable OutputDescriptorAttachmentRegistrarThe registrar strategy to use to notify Maven of attached artifacts.@Nullable StringThe Maven artifact type to use when attaching theprotobindescriptor file to the Maven project.@Nullable PathThe outputprotobindescriptor file to create, ornullif no descriptor file should be created.@Nullable PathThe path to write all output files to.@Nullable DigestThe digest of theprotocbinary to verify, ornullif no verification should take place.@Nullable StringThe version ofprotocto use.@Nullable PathSanctioned path to place executables in.@Nullable Collection<? extends MavenArtifact> Additional user-defined Maven dependencies to include in theprotocimport path, and to compile.@Nullable Collection<? extends MavenArtifact> Additional user-defined Maven dependencies pointing at protobuf descriptor files to compile.@Nullable Collection<Path> Paths relative to the project root that are protobuf descriptor files to compile from.@Nullable Collection<Path> Paths relative to the project root that contain*.protosources to compile.@Nullable SourceRootRegistrarThe registrar strategy to use to notify Maven of generated sources.inthashCode()Computes a hash code from attributes:arguments,binaryMavenPlugins,binaryPathPlugins,binaryUrlPlugins,dependencyResolutionDepth,dependencyScopes,enabledLanguages,excludes,environmentVariables,importDependencies,importPaths,includes,jvmMavenPlugins,outputDirectory,outputDescriptorFile,outputDescriptorAttached,outputDescriptorAttachmentType,outputDescriptorAttachmentClassifier,protocDigest,protocVersion,sanctionedExecutablePath,sourceDependencies,sourceDescriptorDependencies,sourceDescriptorPaths,sourceDirectories,sourceRootRegistrar,outputDescriptorAttachmentRegistrar,cleanOutputDirectories,embedSourcesInClassOutputs,failOnMissingSources,failOnMissingTargets,fatalWarnings,ignoreProjectDependencies,incrementalCompilationEnabled,liteEnabled,outputDescriptorIncludeImports,outputDescriptorIncludeSourceInfo,outputDescriptorRetainOptions,registerAsCompilationRoot.booleanWhether to delete all output directories at the start of the build.booleanWhether to include inputprotosources in the output class directory.booleanWhether to treat non-existent source roots as a build error.booleanWhether to treat builds with no enabled languages, plugins, or descriptor file outputs as a build error.booleanWhether to treatprotocbuild warnings as errors.booleanWhether to skip discovering*.protofiles to import from the Maven project<dependencies/>block.booleanWhether to enable incrementally compiling sources.booleanWhether to request the generation of "lite" sources.booleanWhether to attach outputprotobindescriptor file to Maven project.booleanWhether to include imports in the outputprotobindescriptor.booleanWhether to include source information in the outputprotobindescriptor.booleanWhether to retain build option metadata in the outputprotobindescriptor.booleanWhether to mark generated sources as candidates for compilation with themaven-compiler-pluginand similar plugins.toString()Prints the immutable valueGenerationRequestwith attribute values.
-
Method Details
-
getArguments
Additional arguments to pass toprotoc.- Specified by:
getArgumentsin interfaceGenerationRequest- Returns:
- the arguments list.
-
getBinaryMavenPlugins
Binaryprotocplugins that should be resolved from Maven repositories.- Specified by:
getBinaryMavenPluginsin interfaceGenerationRequest- Returns:
- the collection of plugins.
-
getBinaryPathPlugins
Binaryprotocplugins that should be resolved from the system$PATH.- Specified by:
getBinaryPathPluginsin interfaceGenerationRequest- Returns:
- the collection of plugins.
-
getBinaryUrlPlugins
Binaryprotocplugins that should be resolved from URLs.- Specified by:
getBinaryUrlPluginsin interfaceGenerationRequest- Returns:
- the collection of plugins.
-
getDependencyResolutionDepth
The preference for how to resolve transitive dependencies by default.- Specified by:
getDependencyResolutionDepthin interfaceGenerationRequest- Returns:
- the dependency resolution depth preference.
-
getDependencyScopes
The dependency scopes to allow when searching the Maven project dependency list for*.protofiles.- Specified by:
getDependencyScopesin interfaceGenerationRequest- Returns:
- the set of scopes.
-
getEnabledLanguages
The collection of supported langagues to enable inprotoc.- Specified by:
getEnabledLanguagesin interfaceGenerationRequest- Returns:
- the languages.
-
getExcludes
The collection of*.protopath patterns to exclude from being passed toprotoc.- Specified by:
getExcludesin interfaceGenerationRequest- Returns:
- the collection of glob patterns.
-
getEnvironmentVariables
Additional environment variables to set when callingprotoc.- Specified by:
getEnvironmentVariablesin interfaceGenerationRequest
-
getImportDependencies
Additional user-defined Maven dependencies to include in theprotocimport path.- Specified by:
getImportDependenciesin interfaceGenerationRequest- Returns:
- the collection of dependencies.
-
getImportPaths
Additional user-defined paths relative to the project root to include in theprotocimport path.- Specified by:
getImportPathsin interfaceGenerationRequest- Returns:
- the collection of paths.
-
getIncludes
The collection of*.protopath patterns to include to be passed toprotoc.- Specified by:
getIncludesin interfaceGenerationRequest- Returns:
- the collection of glob patterns.
-
getJvmMavenPlugins
Java executable projects that satisfy theprotocplugin interface to wrap in bootstrapping scripts and pass toprotoc.- Specified by:
getJvmMavenPluginsin interfaceGenerationRequest- Returns:
- the collection of plugins.
-
getOutputDirectory
The path to write all output files to.- Specified by:
getOutputDirectoryin interfaceGenerationRequest- Returns:
- the output path.
-
getOutputDescriptorFile
The outputprotobindescriptor file to create, ornullif no descriptor file should be created.- Specified by:
getOutputDescriptorFilein interfaceGenerationRequest- Returns:
- the path to the descriptor file to output, or
null.
-
isOutputDescriptorAttached
public boolean isOutputDescriptorAttached()Whether to attach outputprotobindescriptor file to Maven project.- Specified by:
isOutputDescriptorAttachedin interfaceGenerationRequest- Returns:
- flag indicating if descriptor file should be attached.
-
getOutputDescriptorAttachmentType
The Maven artifact type to use when attaching theprotobindescriptor file to the Maven project.- Specified by:
getOutputDescriptorAttachmentTypein interfaceGenerationRequest- Returns:
- the artifact type, or
null.
-
getOutputDescriptorAttachmentClassifier
The Maven artifact classifier to use when attaching theprotobindescriptor file to the Maven project.- Specified by:
getOutputDescriptorAttachmentClassifierin interfaceGenerationRequest- Returns:
- the artifact classifier, or
null.
-
getProtocDigest
The digest of theprotocbinary to verify, ornullif no verification should take place.This does not affect any verification performed by Aether.
- Specified by:
getProtocDigestin interfaceGenerationRequest- Returns:
- the digest.
- Since:
- 3.5.0
-
getProtocVersion
The version ofprotocto use.This will be one of:
- A Maven version string (such as
4.29.3), to indicate to pull from the Maven repositories; - The literal string
PATH, to indicate to invoke theprotocbinary on the system$PATH; - A URL to a binary to execute.
- Specified by:
getProtocVersionin interfaceGenerationRequest- Returns:
- the version indicator.
- A Maven version string (such as
-
getSanctionedExecutablePath
Sanctioned path to place executables in.Used for corporate environments with overly locked-down policies on where native executables can be placed.
- Specified by:
getSanctionedExecutablePathin interfaceGenerationRequest- Returns:
- the sanctioned path, or
nullif no movement of resources is desired.
-
getSourceDependencies
Additional user-defined Maven dependencies to include in theprotocimport path, and to compile.- Specified by:
getSourceDependenciesin interfaceGenerationRequest- Returns:
- the collection of dependencies.
-
getSourceDescriptorDependencies
Additional user-defined Maven dependencies pointing at protobuf descriptor files to compile.- Specified by:
getSourceDescriptorDependenciesin interfaceGenerationRequest- Returns:
- the collection of dependencies pointing to protobuf descriptor files.
- Since:
- 3.1.0
-
getSourceDescriptorPaths
Paths relative to the project root that are protobuf descriptor files to compile from.- Specified by:
getSourceDescriptorPathsin interfaceGenerationRequest- Returns:
- the source descriptor file paths.
-
getSourceDirectories
Paths relative to the project root that contain*.protosources to compile.- Specified by:
getSourceDirectoriesin interfaceGenerationRequest- Returns:
- the source directory paths.
-
getSourceRootRegistrar
The registrar strategy to use to notify Maven of generated sources.- Specified by:
getSourceRootRegistrarin interfaceGenerationRequest- Returns:
- the registrar strategy.
-
getOutputDescriptorAttachmentRegistrar
The registrar strategy to use to notify Maven of attached artifacts.- Specified by:
getOutputDescriptorAttachmentRegistrarin interfaceGenerationRequest- Returns:
- the registrar strategy.
-
isCleanOutputDirectories
public boolean isCleanOutputDirectories()Whether to delete all output directories at the start of the build.Ignored if using incremental compilation.
- Specified by:
isCleanOutputDirectoriesin interfaceGenerationRequest- Returns:
- the boolean preference.
-
isEmbedSourcesInClassOutputs
public boolean isEmbedSourcesInClassOutputs()Whether to include inputprotosources in the output class directory.- Specified by:
isEmbedSourcesInClassOutputsin interfaceGenerationRequest- Returns:
- the boolean preference.
-
isFailOnMissingSources
public boolean isFailOnMissingSources()Whether to treat non-existent source roots as a build error.- Specified by:
isFailOnMissingSourcesin interfaceGenerationRequest- Returns:
- the boolean preference.
-
isFailOnMissingTargets
public boolean isFailOnMissingTargets()Whether to treat builds with no enabled languages, plugins, or descriptor file outputs as a build error.- Specified by:
isFailOnMissingTargetsin interfaceGenerationRequest- Returns:
- the boolean preference.
-
isFatalWarnings
public boolean isFatalWarnings()Whether to treatprotocbuild warnings as errors.- Specified by:
isFatalWarningsin interfaceGenerationRequest- Returns:
- the boolean preference.
-
isIgnoreProjectDependencies
public boolean isIgnoreProjectDependencies()Whether to skip discovering*.protofiles to import from the Maven project<dependencies/>block.- Specified by:
isIgnoreProjectDependenciesin interfaceGenerationRequest- Returns:
- the boolean preference.
-
isIncrementalCompilationEnabled
public boolean isIncrementalCompilationEnabled()Whether to enable incrementally compiling sources.- Specified by:
isIncrementalCompilationEnabledin interfaceGenerationRequest- Returns:
- the boolean preference.
-
isLiteEnabled
public boolean isLiteEnabled()Whether to request the generation of "lite" sources.- Specified by:
isLiteEnabledin interfaceGenerationRequest- Returns:
- the boolean preference.
-
isOutputDescriptorIncludeImports
public boolean isOutputDescriptorIncludeImports()Whether to include imports in the outputprotobindescriptor.- Specified by:
isOutputDescriptorIncludeImportsin interfaceGenerationRequest- Returns:
- the boolean preference.
-
isOutputDescriptorIncludeSourceInfo
public boolean isOutputDescriptorIncludeSourceInfo()Whether to include source information in the outputprotobindescriptor.- Specified by:
isOutputDescriptorIncludeSourceInfoin interfaceGenerationRequest- Returns:
- the boolean preference.
-
isOutputDescriptorRetainOptions
public boolean isOutputDescriptorRetainOptions()Whether to retain build option metadata in the outputprotobindescriptor.- Specified by:
isOutputDescriptorRetainOptionsin interfaceGenerationRequest- Returns:
- the boolean preference.
-
isRegisterAsCompilationRoot
public boolean isRegisterAsCompilationRoot()Whether to mark generated sources as candidates for compilation with themaven-compiler-pluginand similar plugins.- Specified by:
isRegisterAsCompilationRootin interfaceGenerationRequest- Returns:
- the boolean preference.
-
equals
-
hashCode
public int hashCode()Computes a hash code from attributes:arguments,binaryMavenPlugins,binaryPathPlugins,binaryUrlPlugins,dependencyResolutionDepth,dependencyScopes,enabledLanguages,excludes,environmentVariables,importDependencies,importPaths,includes,jvmMavenPlugins,outputDirectory,outputDescriptorFile,outputDescriptorAttached,outputDescriptorAttachmentType,outputDescriptorAttachmentClassifier,protocDigest,protocVersion,sanctionedExecutablePath,sourceDependencies,sourceDescriptorDependencies,sourceDescriptorPaths,sourceDirectories,sourceRootRegistrar,outputDescriptorAttachmentRegistrar,cleanOutputDirectories,embedSourcesInClassOutputs,failOnMissingSources,failOnMissingTargets,fatalWarnings,ignoreProjectDependencies,incrementalCompilationEnabled,liteEnabled,outputDescriptorIncludeImports,outputDescriptorIncludeSourceInfo,outputDescriptorRetainOptions,registerAsCompilationRoot. -
toString
-
builder
Creates a builder forImmutableGenerationRequest.ImmutableGenerationRequest.builder() .addArguments|addAllArguments(String) //
argumentselements .binaryMavenPlugins(Collection<? extends io.github.ascopes.protobufmavenplugin.plugins.MavenProtocPlugin> | null) // nullablebinaryMavenPlugins.binaryPathPlugins(Collection<? extends io.github.ascopes.protobufmavenplugin.plugins.PathProtocPlugin> | null) // nullablebinaryPathPlugins.binaryUrlPlugins(Collection<? extends io.github.ascopes.protobufmavenplugin.plugins.UriProtocPlugin> | null) // nullablebinaryUrlPlugins.dependencyResolutionDepth(io.github.ascopes.protobufmavenplugin.dependencies.DependencyResolutionDepth | null) // nullabledependencyResolutionDepth.addDependencyScopes|addAllDependencyScopes(String) //dependencyScopeselements .enabledLanguages(Collection<io.github.ascopes.protobufmavenplugin.generation.Language> | null) // nullableenabledLanguages.addExcludes|addAllExcludes(String) //excludeselements .putEnvironmentVariables|putAllEnvironmentVariables(String => String) //environmentVariablesmappings .importDependencies(Collection<? extends io.github.ascopes.protobufmavenplugin.dependencies.MavenArtifact> | null) // nullableimportDependencies.importPaths(Collection<java.nio.file.Path> | null) // nullableimportPaths.addIncludes|addAllIncludes(String) //includeselements .jvmMavenPlugins(Collection<? extends io.github.ascopes.protobufmavenplugin.plugins.MavenProtocPlugin> | null) // nullablejvmMavenPlugins.outputDirectory(java.nio.file.Path | null) // nullableoutputDirectory.outputDescriptorFile(java.nio.file.Path | null) // nullableoutputDescriptorFile.outputDescriptorAttached(boolean) // requiredoutputDescriptorAttached.outputDescriptorAttachmentType(String | null) // nullableoutputDescriptorAttachmentType.outputDescriptorAttachmentClassifier(String | null) // nullableoutputDescriptorAttachmentClassifier.protocDigest(io.github.ascopes.protobufmavenplugin.digests.Digest | null) // nullableprotocDigest.protocVersion(String | null) // nullableprotocVersion.sanctionedExecutablePath(java.nio.file.Path | null) // nullablesanctionedExecutablePath.sourceDependencies(Collection<? extends io.github.ascopes.protobufmavenplugin.dependencies.MavenArtifact> | null) // nullablesourceDependencies.sourceDescriptorDependencies(Collection<? extends io.github.ascopes.protobufmavenplugin.dependencies.MavenArtifact> | null) // nullablesourceDescriptorDependencies.sourceDescriptorPaths(Collection<java.nio.file.Path> | null) // nullablesourceDescriptorPaths.sourceDirectories(Collection<java.nio.file.Path> | null) // nullablesourceDirectories.sourceRootRegistrar(io.github.ascopes.protobufmavenplugin.generation.SourceRootRegistrar | null) // nullablesourceRootRegistrar.outputDescriptorAttachmentRegistrar(io.github.ascopes.protobufmavenplugin.generation.OutputDescriptorAttachmentRegistrar | null) // nullableoutputDescriptorAttachmentRegistrar.cleanOutputDirectories(boolean) // requiredcleanOutputDirectories.embedSourcesInClassOutputs(boolean) // requiredembedSourcesInClassOutputs.failOnMissingSources(boolean) // requiredfailOnMissingSources.failOnMissingTargets(boolean) // requiredfailOnMissingTargets.fatalWarnings(boolean) // requiredfatalWarnings.ignoreProjectDependencies(boolean) // requiredignoreProjectDependencies.incrementalCompilationEnabled(boolean) // requiredincrementalCompilationEnabled.liteEnabled(boolean) // requiredliteEnabled.outputDescriptorIncludeImports(boolean) // requiredoutputDescriptorIncludeImports.outputDescriptorIncludeSourceInfo(boolean) // requiredoutputDescriptorIncludeSourceInfo.outputDescriptorRetainOptions(boolean) // requiredoutputDescriptorRetainOptions.registerAsCompilationRoot(boolean) // requiredregisterAsCompilationRoot.build();- Returns:
- A new ImmutableGenerationRequest builder
-