diff options
author | mjhalupka <mjhalupka@google.com> | 2018-03-08 12:08:25 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-03-08 12:10:56 -0800 |
commit | 7b398f9a5306de887d53a30d9b3f057b0e938ec9 (patch) | |
tree | 72af6b8abd3a6bd67ff39467922beb19f9ae706d /src/main/java/com/google/devtools/build/lib/packages | |
parent | fb2b6687c6e7c4e9d75a097ed8db1863dabad8fc (diff) |
Tag SkylarkComputedDefault with @AutoCodec
PiperOrigin-RevId: 188367892
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/packages')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/packages/Attribute.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/packages/Attribute.java b/src/main/java/com/google/devtools/build/lib/packages/Attribute.java index 4821e3b85b..5623847960 100644 --- a/src/main/java/com/google/devtools/build/lib/packages/Attribute.java +++ b/src/main/java/com/google/devtools/build/lib/packages/Attribute.java @@ -36,6 +36,7 @@ import com.google.devtools.build.lib.cmdline.Label; import com.google.devtools.build.lib.events.EventHandler; import com.google.devtools.build.lib.events.Location; import com.google.devtools.build.lib.packages.RuleClass.Builder.RuleClassNamePredicate; +import com.google.devtools.build.lib.skyframe.serialization.autocodec.AutoCodec; import com.google.devtools.build.lib.syntax.ClassObject; import com.google.devtools.build.lib.syntax.EvalException; import com.google.devtools.build.lib.syntax.EvalUtils; @@ -1449,6 +1450,7 @@ public final class Attribute implements Comparable<Attribute> { * {@link #getPossibleValues(Type, Rule)} and {@link #getDefault(AttributeMap)} do lookups in that * table. */ + @AutoCodec static final class SkylarkComputedDefault extends ComputedDefault { private final List<Type<?>> dependencyTypes; @@ -1457,17 +1459,17 @@ public final class Attribute implements Comparable<Attribute> { /** * Creates a new SkylarkComputedDefault containing a lookup table. * - * @param requiredAttributes A list of all names of other attributes that are accessed by this + * @param dependencies A list of all names of other attributes that are accessed by this * attribute. * @param dependencyTypes A list of requiredAttributes' types. * @param lookupTable An exhaustive mapping from requiredAttributes assignments to values this * computed default evaluates to. */ SkylarkComputedDefault( - ImmutableList<String> requiredAttributes, + ImmutableList<String> dependencies, ImmutableList<Type<?>> dependencyTypes, Map<List<Object>, Object> lookupTable) { - super(Preconditions.checkNotNull(requiredAttributes)); + super(Preconditions.checkNotNull(dependencies)); this.dependencyTypes = Preconditions.checkNotNull(dependencyTypes); this.lookupTable = Preconditions.checkNotNull(lookupTable); } |