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.
  • Nested Class Summary

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

    Modifier and Type
    Method
    Description
    Creates a new ModelDiff.Builder that provides in-depth diff analysis.
    static List<software.amazon.smithy.model.validation.ValidationEvent>
    compare(ClassLoader classLoader, software.amazon.smithy.model.Model oldModel, software.amazon.smithy.model.Model newModel)
    Evaluates the differences between two models.
    static List<software.amazon.smithy.model.validation.ValidationEvent>
    compare(software.amazon.smithy.model.Model oldModel, software.amazon.smithy.model.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 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<software.amazon.smithy.model.validation.ValidationEvent> compare(software.amazon.smithy.model.Model oldModel, software.amazon.smithy.model.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<software.amazon.smithy.model.validation.ValidationEvent> compare(ClassLoader classLoader, software.amazon.smithy.model.Model oldModel, software.amazon.smithy.model.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.