aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/actions
diff options
context:
space:
mode:
authorGravatar janakr <janakr@google.com>2017-12-20 13:37:13 -0800
committerGravatar Copybara-Service <copybara-piper@google.com>2017-12-20 13:39:27 -0800
commitac2cd35438e13504336ced63b6a06581445b66a5 (patch)
treed0e61cc25908698618839c0dff681d3e0857bebe /src/main/java/com/google/devtools/build/lib/actions
parent8a56db3724333c4bf5f0d54e22ffa122c3078b4d (diff)
Get rid of LabelAndConfiguration class: ConfiguredTargetKey contains the same information and is more useful, since it's practically a SkyKey.
PiperOrigin-RevId: 179727105
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/actions')
-rw-r--r--src/main/java/com/google/devtools/build/lib/actions/Artifact.java10
-rw-r--r--src/main/java/com/google/devtools/build/lib/actions/ArtifactOwner.java27
2 files changed, 19 insertions, 18 deletions
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 7ecdede085..e47d0e3bd6 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
@@ -301,11 +301,11 @@ public class Artifact
}
/**
- * Get the {@code LabelAndConfiguration} of the {@code ConfiguredTarget} that owns this artifact,
- * if it was set. Otherwise, this should be a dummy value -- either {@link
- * ArtifactOwner#NULL_OWNER} or a dummy owner set in tests. Such a dummy value should only occur
- * for source artifacts if created without specifying the owner, or for special derived artifacts,
- * such as target completion middleman artifacts, build info artifacts, and the like.
+ * Gets the {@code ActionLookupKey} of the {@code ConfiguredTarget} that owns this artifact, if it
+ * was set. Otherwise, this should be a dummy value -- either {@link ArtifactOwner#NULL_OWNER} or
+ * a dummy owner set in tests. Such a dummy value should only occur for source artifacts if
+ * created without specifying the owner, or for special derived artifacts, such as target
+ * completion middleman artifacts, build info artifacts, and the like.
*/
public final ArtifactOwner getArtifactOwner() {
return owner;
diff --git a/src/main/java/com/google/devtools/build/lib/actions/ArtifactOwner.java b/src/main/java/com/google/devtools/build/lib/actions/ArtifactOwner.java
index 94f29632c6..597893f6b5 100644
--- a/src/main/java/com/google/devtools/build/lib/actions/ArtifactOwner.java
+++ b/src/main/java/com/google/devtools/build/lib/actions/ArtifactOwner.java
@@ -17,23 +17,24 @@ import com.google.common.annotations.VisibleForTesting;
import com.google.devtools.build.lib.cmdline.Label;
/**
- * An interface for {@code LabelAndConfiguration}, or at least for a {@link Label}. Only tests and
- * internal {@link Artifact}-generators should implement this interface -- otherwise,
- * {@code LabelAndConfiguration} should be the only implementation.
+ * An interface for {@code ActionLookupKey}, or at least for a {@link Label}. Only tests and
+ * internal {@link Artifact}-generators should implement this interface -- otherwise, {@code
+ * ActionLookupKey} and its subclasses should be the only implementation.
*/
public interface ArtifactOwner {
Label getLabel();
@VisibleForTesting
- public static final ArtifactOwner NULL_OWNER = new ArtifactOwner() {
- @Override
- public Label getLabel() {
- return null;
- }
+ ArtifactOwner NULL_OWNER =
+ new ArtifactOwner() {
+ @Override
+ public Label getLabel() {
+ return null;
+ }
- @Override
- public String toString() {
- return "NULL_OWNER";
- }
- };
+ @Override
+ public String toString() {
+ return "NULL_OWNER";
+ }
+ };
}