Delete some dead code.
RELNOTES: None
@@ -43,7 +43,6 @@ import com.google.devtools.build.lib.skylarkinterface.SkylarkPrinter;
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 class Artifact
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 class Artifact
return false;
}
- /** Only callable if isSourceArtifact() is true. */
- public SourceArtifact asSourceArtifact() {
- throw new IllegalStateException("Not a source artifact!");
- }
-
/** {@link Artifact#isSourceArtifact() is true.
*
* <p>Source artifacts have the property that unlike for output artifacts, direct file system
@@ -516,11 +505,6 @@ public class Artifact
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 @@ public class Artifact
}
}
- /**
- * Lazily converts artifacts into absolute path strings. Middleman artifacts are ignored by
- * this method.
- */
- public static Iterable<String> toAbsolutePaths(Iterable<Artifact> 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 @@ public class Artifact
}
}
- /**
- * 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<String> asExpandedExecPathStrings(Iterable<Artifact> artifacts,
- ArtifactExpander artifactExpander) {
- List<String> 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<PathFragment> asExpandedExecPaths(Iterable<Artifact> artifacts,
- ArtifactExpander artifactExpander) {
- List<PathFragment> 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.
