Class ModelDiff


  • public final class ModelDiff
    extends java.lang.Object
    Computes the difference between two models and any problems that might occur due to those differences.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  ModelDiff.Builder
      Builder used to construct a diff of two Smithy models.
      static class  ModelDiff.Result
      The result of comparing two Smithy models.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static ModelDiff.Builder builder()
      Creates a new ModelDiff.Builder that provides in-depth diff analysis.
      static java.util.List<ValidationEvent> compare​(java.lang.ClassLoader classLoader, Model oldModel, Model newModel)
      Evaluates the differences between two models.
      static java.util.List<ValidationEvent> compare​(Model oldModel, Model newModel)
      Evaluates the differences between two models.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • builder

        public static ModelDiff.Builder builder()
        Creates a new ModelDiff.Builder that provides in-depth diff analysis.
        Returns:
        Returns the builder.
      • compare

        public static java.util.List<ValidationEvent> compare​(Model oldModel,
                                                              Model newModel)
        Evaluates the differences between two models.

        Use ModelDiff.Builder directly to get access to additional information.

        Parameters:
        oldModel - Previous version of the model.
        newModel - New model to compare.
        Returns:
        Returns the computed validation events.
      • compare

        public static java.util.List<ValidationEvent> compare​(java.lang.ClassLoader classLoader,
                                                              Model oldModel,
                                                              Model newModel)
        Evaluates the differences between two models.

        Use ModelDiff.Builder directly to get access to additional information.

        Parameters:
        classLoader - ClassLoader used to find DiffEvaluator service providers.
        oldModel - Previous version of the model.
        newModel - New model to compare.
        Returns:
        Returns the computed validation events.