Skip to content

Commit

Permalink
Delete some dead code.
Browse files Browse the repository at this point in the history
RELNOTES: None
PiperOrigin-RevId: 218497901
  • Loading branch information
meisterT authored and Copybara-Service committed Oct 24, 2018
1 parent 118c16b commit 0f69a74
Showing 1 changed file with 0 additions and 50 deletions.
50 changes: 0 additions & 50 deletions src/main/java/com/google/devtools/build/lib/actions/Artifact.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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.
*
* <p>Source artifacts have the property that unlike for output artifacts, direct file system
Expand All @@ -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.
Expand Down Expand Up @@ -830,16 +814,6 @@ static <E> void addNonMiddlemanArtifacts(Iterable<Artifact> artifacts,
}
}

/**
* 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.
Expand Down Expand Up @@ -946,30 +920,6 @@ private static <E> 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<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.
Expand Down

0 comments on commit 0f69a74

Please sign in to comment.