public final class TransformContext extends java.lang.Object implements ToSmithyBuilder<TransformContext>
ProjectionTransformer
.
Implementer's note: A context object is used to allow contextual information provided to projection transforms to evolve over time.
Modifier and Type | Class and Description |
---|---|
static class |
TransformContext.Builder
Builds a
TransformContext . |
Modifier and Type | Method and Description |
---|---|
static TransformContext.Builder |
builder() |
Model |
getModel()
Gets the model to transform.
|
java.util.Optional<Model> |
getOriginalModel()
Get the original model before applying the projection.
|
java.util.List<ValidationEvent> |
getOriginalModelValidationEvents()
Gets an immutable list of
ValidationEvent s that were
encountered when loading the source model. |
java.lang.String |
getProjectionName()
Gets the name of the projection being applied.
|
ObjectNode |
getSettings()
Gets the arguments object of the transform.
|
java.util.Set<java.nio.file.Path> |
getSources()
Gets the source models, or models that are considered the subject
of the build.
|
ModelTransformer |
getTransformer()
Gets the
ModelTransformer that has been configured to aid
in the transformation. |
TransformContext.Builder |
toBuilder()
Take this object and create a builder that contains all of the
current property values of this object.
|
public static TransformContext.Builder builder()
public TransformContext.Builder toBuilder()
ToSmithyBuilder
toBuilder
in interface ToSmithyBuilder<TransformContext>
public ObjectNode getSettings()
public Model getModel()
public java.util.Optional<Model> getOriginalModel()
public java.util.Set<java.nio.file.Path> getSources()
This does not return an exhaustive set of model paths! There are typically two kinds of models that are added to a build: source models and discovered models. Discovered models are someone else's models. Source models are the models owned by the package being built.
public java.lang.String getProjectionName()
If no projection could be found, "source" is assumed.
public ModelTransformer getTransformer()
ModelTransformer
that has been configured to aid
in the transformation.public java.util.List<ValidationEvent> getOriginalModelValidationEvents()
ValidationEvent
s that were
encountered when loading the source model.