diff --git a/src/main/java/com/google/devtools/build/lib/actions/Artifact.java b/src/main/java/com/google/devtools/build/lib/actions/Artifact.java index efca8b05642d54..cf83f7b3fc7ec2 100644 --- a/src/main/java/com/google/devtools/build/lib/actions/Artifact.java +++ b/src/main/java/com/google/devtools/build/lib/actions/Artifact.java @@ -43,7 +43,6 @@ import com.google.devtools.build.lib.syntax.EvalUtils; import com.google.devtools.build.lib.syntax.EvalUtils.ComparisonException; import com.google.devtools.build.lib.util.FileType; -import com.google.devtools.build.lib.util.FileTypeSet; import com.google.devtools.build.lib.vfs.Path; import com.google.devtools.build.lib.vfs.PathFragment; import com.google.devtools.build.skyframe.SkyFunctionName; @@ -390,11 +389,6 @@ public boolean isFileType(FileType fileType) { return fileType.matches(this); } - /** Checks whether this artifact is any of the supplied file types. */ - public boolean isAnyFileType(FileTypeSet fileTypeSet) { - return fileTypeSet.matches(filePathForFileTypeMatcher()); - } - @Override public String filePathForFileTypeMatcher() { return getExecPath().filePathForFileTypeMatcher(); @@ -498,11 +492,6 @@ public boolean isConstantMetadata() { return false; } - /** Only callable if isSourceArtifact() is true. */ - public SourceArtifact asSourceArtifact() { - throw new IllegalStateException("Not a source artifact!"); - } - /** {@link Artifact#isSourceArtifact() is true. * *

Source artifacts have the property that unlike for output artifacts, direct file system @@ -516,11 +505,6 @@ public SourceArtifact(ArtifactRoot root, PathFragment execPath, ArtifactOwner ow super(root, execPath, owner); } - @Override - public SourceArtifact asSourceArtifact() { - return this; - } - /** * SourceArtifacts are compared without their owners, since owners do not affect behavior, * unlike with derived artifacts, whose owners determine their generating actions. @@ -830,16 +814,6 @@ static void addNonMiddlemanArtifacts(Iterable artifacts, } } - /** - * Lazily converts artifacts into absolute path strings. Middleman artifacts are ignored by - * this method. - */ - public static Iterable toAbsolutePaths(Iterable artifacts) { - return Iterables.transform( - Iterables.filter(artifacts, MIDDLEMAN_FILTER), - artifact -> artifact.getPath().getPathString()); - } - /** * Lazily converts artifacts into root-relative path strings. Middleman artifacts are ignored by * this method. @@ -946,30 +920,6 @@ private static void expandArtifact(Artifact middleman, } } - /** - * Converts a collection of artifacts into execution-time path strings, and - * returns those as a list. Middleman artifacts are expanded once. The - * returned list is mutable. - */ - public static List asExpandedExecPathStrings(Iterable artifacts, - ArtifactExpander artifactExpander) { - List result = new ArrayList<>(); - addExpandedExecPathStrings(artifacts, result, artifactExpander); - return result; - } - - /** - * Converts a collection of artifacts into execution-time path fragments, and - * returns those as a list. Middleman artifacts are expanded once. The - * returned list is mutable. - */ - public static List asExpandedExecPaths(Iterable artifacts, - ArtifactExpander artifactExpander) { - List result = new ArrayList<>(); - addExpandedExecPaths(artifacts, result, artifactExpander); - return result; - } - /** * Converts a collection of artifacts into execution-time path strings with * the root-break delimited with a colon ':', and adds those to a given list.