Class ModelDiff

java.lang.Object
software.amazon.smithy.diff.ModelDiff

public final class ModelDiff extends Object
Computes the difference between two models and any problems that might occur due to those differences.
  • Method Details

    • builder

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

      public static 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 List<ValidationEvent> compare(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.