Package software.amazon.smithy.diff
Class ModelDiff.Builder
java.lang.Object
software.amazon.smithy.diff.ModelDiff.Builder
- Enclosing class:
- ModelDiff
Builder used to construct a diff of two Smithy models.
-
Method Summary
Modifier and TypeMethodDescriptionclassLoader(ClassLoader classLoader) Sets the ClassLoader used to findDiffEvaluatorservice providers.compare()Performs the diff of the old and new models.Sets the new model to compare against.newModel(ValidatedResult<Model> newModel) Sets the new model to compare against along with the validation events encountered while loading the model.Sets the old model to compare against.oldModel(ValidatedResult<Model> oldModel) Sets the old model to compare against along with the validation events encountered while loading the model.
-
Method Details
-
classLoader
Sets the ClassLoader used to findDiffEvaluatorservice providers.- Parameters:
classLoader- ClassLoader to use.- Returns:
- Returns the builder.
-
oldModel
Sets the old model to compare against.- Parameters:
oldModel- Old version of a model.- Returns:
- Returns the builder.
-
newModel
Sets the new model to compare against.- Parameters:
newModel- New version of a model.- Returns:
- Returns the builder.
-
oldModel
Sets the old model to compare against along with the validation events encountered while loading the model.- Parameters:
oldModel- Old version of a model with events.- Returns:
- Returns the builder.
-
newModel
Sets the new model to compare against along with the validation events encountered while loading the model.- Parameters:
newModel- New version of a model with events.- Returns:
- Returns the builder.
-
compare
Performs the diff of the old and new models.- Returns:
- Returns the diff
ModelDiff.Result. - Throws:
IllegalStateException- ifoldModelandnewModelare not set.
-