-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathCodemodPackageUpdateResult.java
More file actions
42 lines (34 loc) · 1.18 KB
/
CodemodPackageUpdateResult.java
File metadata and controls
42 lines (34 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package io.codemodder;
import io.codemodder.codetf.CodeTFChangesetEntry;
import io.codemodder.codetf.CodeTFPackageAction;
import java.nio.file.Path;
import java.util.List;
import java.util.Set;
/** A model of a codemod's updating of packages. */
public interface CodemodPackageUpdateResult {
/** A structured description of what we were able to do. */
List<CodeTFPackageAction> packageActions();
/** The changes that were made to the manifest file. */
List<CodeTFChangesetEntry> manifestChanges();
/** The set of files that we attempted to update, but failed. */
Set<Path> filesFailedToChange();
static CodemodPackageUpdateResult from(
final List<CodeTFPackageAction> packageActions,
final List<CodeTFChangesetEntry> manifestChanges,
final Set<Path> filesFailedToChange) {
return new CodemodPackageUpdateResult() {
@Override
public List<CodeTFPackageAction> packageActions() {
return packageActions;
}
@Override
public List<CodeTFChangesetEntry> manifestChanges() {
return manifestChanges;
}
@Override
public Set<Path> filesFailedToChange() {
return filesFailedToChange;
}
};
}
}