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

io.codemodder.javaparser.ChangesResult Maven / Gradle / Ivy

package io.codemodder.javaparser;

import io.codemodder.DependencyGAV;
import java.util.List;

/** Represents the result of changes made during parsing. */
public interface ChangesResult {

  /** Returns true if changes were applied. */
  boolean areChangesApplied();

  List getDependenciesRequired();

  ChangesResult noChanges = new DefaultChangesResult(false, List.of());
  ChangesResult changesApplied = new DefaultChangesResult(true, List.of());

  static ChangesResult changesAppliedWith(List dependenciesRequired) {
    if (dependenciesRequired == null || dependenciesRequired.isEmpty()) {
      throw new IllegalArgumentException("Dependencies cannot be empty");
    }
    return new DefaultChangesResult(true, dependenciesRequired);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy