aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/packages/AspectDefinition.java
diff options
context:
space:
mode:
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;
}