All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.codemodder.DependencyUpdateResult Maven / Gradle / Ivy

There is a newer version: 0.97.9
Show newest version
package io.codemodder;

import io.codemodder.codetf.CodeTFChangesetEntry;
import java.nio.file.Path;
import java.util.List;
import java.util.Set;

/** Represents the result of a dependency update operation. */
public interface DependencyUpdateResult {

  /** The list of dependencies that were successfully injected into the project. */
  List injectedPackages();

  /** The list of dependencies that were already available to the given file. */
  List skippedPackages();

  /**
   * An updated model of the changed files in the project, after the dependency update operation.
   * This includes the changes that were passed in, as well as any changes that were made to the
   * project as a result of our updates.
   */
  List packageChanges();

  /** The set of files that we attempted to update, but failed. */
  Set erroredFiles();

  /** An update reporting no actions and no errors. */
  DependencyUpdateResult EMPTY_UPDATE = create(List.of(), List.of(), List.of(), Set.of());

  static DependencyUpdateResult create(
      final List injectedDependencies,
      final List skippedPackages,
      final List updatedChanges,
      final Set erroredFiles) {
    return new DefaultDependencyUpdateResult(
        injectedDependencies, skippedPackages, updatedChanges, erroredFiles);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy