aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/AspectValue.java
diff options
context:
space:
mode:
authorGravatar Dmitry Lomov <dslomov@google.com>2015-08-19 16:57:49 +0000
committerGravatar Lukacs Berki <lberki@google.com>2015-08-20 14:49:12 +0000
commite2033b1d28d3f17c7e307f62b2b13c3eed72a7f6 (patch)
tree25d06fad6196071dd07756c5e1a661bd689198fc /src/main/java/com/google/devtools/build/lib/skyframe/AspectValue.java
parent25f4494c484512898671aab57790f4917c0f9319 (diff)
A prototype implementation of top-level aspects.
-- MOS_MIGRATED_REVID=101033236
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/AspectValue.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/AspectValue.java35
1 files changed, 33 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/AspectValue.java b/src/main/java/com/google/devtools/build/lib/skyframe/AspectValue.java
index b8a60273f6..2657caa438 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/AspectValue.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/AspectValue.java
@@ -19,6 +19,7 @@ import com.google.devtools.build.lib.actions.Action;
import com.google.devtools.build.lib.analysis.Aspect;
import com.google.devtools.build.lib.analysis.ConfiguredAspectFactory;
import com.google.devtools.build.lib.analysis.config.BuildConfiguration;
+import com.google.devtools.build.lib.events.Location;
import com.google.devtools.build.lib.syntax.Label;
import com.google.devtools.build.skyframe.SkyFunctionName;
import com.google.devtools.build.skyframe.SkyKey;
@@ -91,19 +92,49 @@ public final class AspectValue extends ActionLookupValue {
}
}
+ private final Label label;
+ private final Location location;
+ private final AspectKey key;
private final Aspect aspect;
- public AspectValue(Aspect aspect, Iterable<Action> actions) {
+ public AspectValue(
+ AspectKey key, Label label, Location location, Aspect aspect, Iterable<Action> actions) {
super(actions);
+ this.location = location;
+ this.label = label;
+ this.key = key;
this.aspect = aspect;
}
- public Aspect get() {
+ public Aspect getAspect() {
return aspect;
}
+ public Label getLabel() {
+ return label;
+ }
+
+ public Location getLocation() {
+ return location;
+ }
+
+ public AspectKey getKey() {
+ return key;
+ }
+
public static SkyKey key(Label label, BuildConfiguration configuration,
Class<? extends ConfiguredAspectFactory> aspectFactory) {
return new SkyKey(SkyFunctions.ASPECT, new AspectKey(label, configuration, aspectFactory));
}
+
+ public static SkyKey key(AspectKey aspectKey) {
+ return new SkyKey(SkyFunctions.ASPECT, aspectKey);
+ }
+
+ public static AspectKey createAspectKey(
+ Label label,
+ BuildConfiguration configuration,
+ Class<? extends ConfiguredAspectFactory> aspectFactory) {
+ return new AspectKey(label, configuration, aspectFactory);
+ }
}