Package software.amazon.smithy.build
Class PluginContext.Builder
- java.lang.Object
-
- software.amazon.smithy.build.PluginContext.Builder
-
- All Implemented Interfaces:
SmithyBuilder<PluginContext>
- Enclosing class:
- PluginContext
public static final class PluginContext.Builder extends java.lang.Object implements SmithyBuilder<PluginContext>
Builds aPluginContext.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PluginContextbuild()Creates an immutable object that is created from the properties that have been set on the builder.PluginContext.Builderevents(java.util.List<ValidationEvent> events)Sets the validation events that occurred after projecting the model.PluginContext.BuilderfileManifest(FileManifest fileManifest)Sets the requiredFileManifestto use in the plugin.PluginContext.Buildermodel(Model model)Sets the required model that is being built.PluginContext.BuilderoriginalModel(Model originalModel)Sets the model that is being built before it was transformed in the projection.PluginContext.BuilderpluginClassLoader(java.lang.ClassLoader pluginClassLoader)Sets a ClassLoader that should be used by build plugins when loading services.PluginContext.Builderprojection(java.lang.String name, ProjectionConfig projection)Sets the projection that the plugin belongs to.PluginContext.Buildersettings(ObjectNode settings)Sets the settings of the plugin.PluginContext.Buildersources(java.util.Collection<java.nio.file.Path> sources)Replaces the path to models that are considered "source" models of the package being built.
-
-
-
Method Detail
-
build
public PluginContext build()
Description copied from interface:SmithyBuilderCreates an immutable object that is created from the properties that have been set on the builder.- Specified by:
buildin interfaceSmithyBuilder<PluginContext>- Returns:
- an instance of T
-
fileManifest
public PluginContext.Builder fileManifest(FileManifest fileManifest)
Sets the requiredFileManifestto use in the plugin.- Parameters:
fileManifest- FileManifest to use.- Returns:
- Returns the builder.
-
model
public PluginContext.Builder model(Model model)
Sets the required model that is being built.- Parameters:
model- Model to set.- Returns:
- Returns the builder.
-
projection
public PluginContext.Builder projection(java.lang.String name, ProjectionConfig projection)
Sets the projection that the plugin belongs to.- Parameters:
name- Name of the projection.projection- ProjectionConfig to set.- Returns:
- Returns the builder.
-
originalModel
public PluginContext.Builder originalModel(Model originalModel)
Sets the model that is being built before it was transformed in the projection.- Parameters:
originalModel- Original Model to set.- Returns:
- Returns the builder.
-
events
public PluginContext.Builder events(java.util.List<ValidationEvent> events)
Sets the validation events that occurred after projecting the model.- Parameters:
events- Validation events to set.- Returns:
- Returns the builder.
-
settings
public PluginContext.Builder settings(ObjectNode settings)
Sets the settings of the plugin.- Parameters:
settings- Settings to set.- Returns:
- Returns the builder.
-
pluginClassLoader
public PluginContext.Builder pluginClassLoader(java.lang.ClassLoader pluginClassLoader)
Sets a ClassLoader that should be used by build plugins when loading services.- Parameters:
pluginClassLoader- ClassLoader to use in build plugins.- Returns:
- Retruns the builder.
-
sources
public PluginContext.Builder sources(java.util.Collection<java.nio.file.Path> sources)
Replaces the path to models that are considered "source" models of the package being built.- Parameters:
sources- Source models to set.- Returns:
- Returns the builder.
-
-