Class Changes

java.lang.Object
org.springframework.modulith.junit.Changes
All Implemented Interfaces:
Iterable<Changes.Change>

public class Changes extends Object implements Iterable<Changes.Change>
A set of Changes.Changes made to a Java project.
Author:
Lukas Dohmen, David Bilge, Oliver Drotbohm
  • Field Details

    • NONE

      public static final Changes NONE
  • Method Details

    • of

      static Changes of(Stream<ModifiedFile> files)
      Creates a new Changes instance from the given ModifiedFiles.
      Parameters:
      files - must not be null.
      Returns:
      will never be null.
    • isEmpty

      boolean isEmpty()
      Returns whether there are any changes at all.
    • getChangedClasses

      Set<String> getChangedClasses()
    • hasClassChanges

      boolean hasClassChanges()
    • contains

      boolean contains(Class<?> type)
    • hasBuildResourceChanges

      boolean hasBuildResourceChanges()
      Returns whether a build-related resource has changed.
      Returns:
    • hasClasspathResourceChange

      boolean hasClasspathResourceChange()
      Returns whether the current changes contain a change to a classpath resource, i.e. a non-source file that lives on the classpath.
    • iterator

      public Iterator<Changes.Change> iterator()
      Specified by:
      iterator in interface Iterable<Changes.Change>
    • toString

      public String toString()
      Overrides:
      toString in class Object