aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/packages/AspectDefinition.java
diff options
context:
space:
mode:
authorGravatar Rumou Duan <rduan@google.com>2015-06-03 20:27:57 +0000
committerGravatar Florian Weikert <fwe@google.com>2015-06-05 09:37:34 +0000
commit5b0b3106b5c8e251cb93d35ce00e10dfba1df9c2 (patch)
treede351bcae79f6b7d7f722ec3aab2faa61135d926 /src/main/java/com/google/devtools/build/lib/packages/AspectDefinition.java
parentad993f7fbd219e8cdbb3b048ebcdac72d2c4eae5 (diff)
Description redacted.
-- MOS_MIGRATED_REVID=95135804
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/packages/AspectDefinition.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/packages/AspectDefinition.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/packages/AspectDefinition.java b/src/main/java/com/google/devtools/build/lib/packages/AspectDefinition.java
index 683cdd9f54..0c2368b6ea 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/AspectDefinition.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/AspectDefinition.java
@@ -174,17 +174,19 @@ public final class AspectDefinition {
}
/**
- * Tells that in order for this aspect to work, the given aspect must be computed for the
- * direct dependencies in the attribute with the specified name on the associated configured
- * target.
+ * Declares that this aspect depends on the given aspects in {@code aspectFactories} provided
+ * by direct dependencies through attribute {@code attribute} on the target associated with this
+ * aspect.
*
* <p>Note that {@code AspectFactory} instances are expected in the second argument, but we
* cannot reference that interface here.
*/
public Builder attributeAspect(
- String attribute, Class<? extends AspectFactory<?, ?, ?>> aspectFactory) {
- this.attributeAspects.put(
- Preconditions.checkNotNull(attribute), Preconditions.checkNotNull(aspectFactory));
+ String attribute, Class<? extends AspectFactory<?, ?, ?>>... aspectFactories) {
+ Preconditions.checkNotNull(attribute);
+ for (Class<? extends AspectFactory<?, ?, ?>> aspectFactory : aspectFactories) {
+ this.attributeAspects.put(attribute, Preconditions.checkNotNull(aspectFactory));
+ }
return this;
}