Class SmithyBuildConfig.Builder
- java.lang.Object
-
- software.amazon.smithy.build.model.SmithyBuildConfig.Builder
-
- All Implemented Interfaces:
SmithyBuilder<SmithyBuildConfig>
- Enclosing class:
- SmithyBuildConfig
public static final class SmithyBuildConfig.Builder extends java.lang.Object implements SmithyBuilder<SmithyBuildConfig>
Builder used to create aSmithyBuildConfig
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SmithyBuildConfig
build()
Creates an immutable object that is created from the properties that have been set on the builder.SmithyBuildConfig.Builder
ignoreMissingPlugins(boolean ignoreMissingPlugins)
Logs instead of failing when a plugin can't be found by name.SmithyBuildConfig.Builder
imports(java.util.Collection<java.lang.String> imports)
Replaces imports on the config.SmithyBuildConfig.Builder
lastModifiedInMillis(long lastModifiedInMillis)
SmithyBuildConfig.Builder
load(java.nio.file.Path config)
Loads and merges the config file into the builder.SmithyBuildConfig.Builder
maven(MavenConfig maven)
SmithyBuildConfig.Builder
merge(SmithyBuildConfig config)
Updates this configuration with the configuration of another file.SmithyBuildConfig.Builder
outputDirectory(java.lang.String outputDirectory)
Set a directory where the build artifacts are written.SmithyBuildConfig.Builder
plugins(java.util.Map<java.lang.String,ObjectNode> plugins)
Replaces plugins on the config.SmithyBuildConfig.Builder
projections(java.util.Map<java.lang.String,ProjectionConfig> projections)
Replaces projections on the config.SmithyBuildConfig.Builder
sources(java.util.Collection<java.lang.String> sources)
Replaces sources on the config.SmithyBuildConfig.Builder
version(java.lang.String version)
Sets the builder config file version.
-
-
-
Method Detail
-
build
public SmithyBuildConfig build()
Description copied from interface:SmithyBuilder
Creates an immutable object that is created from the properties that have been set on the builder.- Specified by:
build
in interfaceSmithyBuilder<SmithyBuildConfig>
- Returns:
- an instance of T
-
version
public SmithyBuildConfig.Builder version(java.lang.String version)
Sets the builder config file version.- Parameters:
version
- Version to set.- Returns:
- Returns the builder.
-
load
public SmithyBuildConfig.Builder load(java.nio.file.Path config)
Loads and merges the config file into the builder.- Parameters:
config
- Config file to load, parse, and merge.- Returns:
- Returns the updated builder.
-
merge
public SmithyBuildConfig.Builder merge(SmithyBuildConfig config)
Updates this configuration with the configuration of another file.- Parameters:
config
- Config to update with.- Returns:
- Returns the builder.
-
outputDirectory
public SmithyBuildConfig.Builder outputDirectory(java.lang.String outputDirectory)
Set a directory where the build artifacts are written.- Parameters:
outputDirectory
- Directory where artifacts are written.- Returns:
- Returns the builder.
-
imports
public SmithyBuildConfig.Builder imports(java.util.Collection<java.lang.String> imports)
Replaces imports on the config.- Parameters:
imports
- Imports to set.- Returns:
- Returns the builder.
-
sources
public SmithyBuildConfig.Builder sources(java.util.Collection<java.lang.String> sources)
Replaces sources on the config.- Parameters:
sources
- Sources to set.- Returns:
- Returns the builder.
-
projections
public SmithyBuildConfig.Builder projections(java.util.Map<java.lang.String,ProjectionConfig> projections)
Replaces projections on the config.- Parameters:
projections
- Projections to set.- Returns:
- Returns the builder.
-
plugins
public SmithyBuildConfig.Builder plugins(java.util.Map<java.lang.String,ObjectNode> plugins)
Replaces plugins on the config.- Parameters:
plugins
- Plugins to set.- Returns:
- Returns the builder.
-
ignoreMissingPlugins
public SmithyBuildConfig.Builder ignoreMissingPlugins(boolean ignoreMissingPlugins)
Logs instead of failing when a plugin can't be found by name.- Parameters:
ignoreMissingPlugins
- Set to true to ignore missing plugins on the classpath.- Returns:
- Returns the builder.
-
maven
public SmithyBuildConfig.Builder maven(MavenConfig maven)
-
lastModifiedInMillis
public SmithyBuildConfig.Builder lastModifiedInMillis(long lastModifiedInMillis)
-
-