diff options
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/analysis/util/TestAspects.java')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/analysis/util/TestAspects.java | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/analysis/util/TestAspects.java b/src/test/java/com/google/devtools/build/lib/analysis/util/TestAspects.java index f6f693e0e3..55b0fe84d8 100644 --- a/src/test/java/com/google/devtools/build/lib/analysis/util/TestAspects.java +++ b/src/test/java/com/google/devtools/build/lib/analysis/util/TestAspects.java @@ -170,7 +170,7 @@ public class TestAspects { String information = parameters.isEmpty() ? "" : " data " + Iterables.getFirst(parameters.getAttribute("baz"), null); - return new ConfiguredAspect.Builder(getClass().getName(), ruleContext) + return new ConfiguredAspect.Builder(this, parameters, ruleContext) .addProvider( new AspectInfo( collectAspectData("aspect " + ruleContext.getLabel() + information, ruleContext))) @@ -180,7 +180,7 @@ public class TestAspects { public static final SimpleAspect SIMPLE_ASPECT = new SimpleAspect(); private static final AspectDefinition SIMPLE_ASPECT_DEFINITION = - new AspectDefinition.Builder("simple").build(); + new AspectDefinition.Builder(SIMPLE_ASPECT).build(); /** * A very simple aspect. @@ -194,14 +194,14 @@ public class TestAspects { public static final ExtraAttributeAspect EXTRA_ATTRIBUTE_ASPECT = new ExtraAttributeAspect(); private static final AspectDefinition EXTRA_ATTRIBUTE_ASPECT_DEFINITION = - new AspectDefinition.Builder("extra_attribute") + new AspectDefinition.Builder(EXTRA_ATTRIBUTE_ASPECT) .add(attr("$dep", LABEL).value(Label.parseAbsoluteUnchecked("//extra:extra"))) .build(); private static final ExtraAttributeAspectRequiringProvider EXTRA_ATTRIBUTE_ASPECT_REQUIRING_PROVIDER = new ExtraAttributeAspectRequiringProvider(); private static final AspectDefinition EXTRA_ATTRIBUTE_ASPECT_REQUIRING_PROVIDER_DEFINITION = - new AspectDefinition.Builder("extra_attribute_with_provider") + new AspectDefinition.Builder(EXTRA_ATTRIBUTE_ASPECT_REQUIRING_PROVIDER) .add(attr("$dep", LABEL).value(Label.parseAbsoluteUnchecked("//extra:extra"))) .requireProvider(RequiredProvider.class) .build(); @@ -218,7 +218,7 @@ public class TestAspects { public static final AttributeAspect ATTRIBUTE_ASPECT = new AttributeAspect(); private static final AspectDefinition ATTRIBUTE_ASPECT_DEFINITION = - new AspectDefinition.Builder("attribute") + new AspectDefinition.Builder(ATTRIBUTE_ASPECT) .attributeAspect("foo", ATTRIBUTE_ASPECT) .build(); @@ -234,7 +234,7 @@ public class TestAspects { } public static final NativeAspectClass ALL_ATTRIBUTES_ASPECT = new AllAttributesAspect(); private static final AspectDefinition ALL_ATTRIBUTES_ASPECT_DEFINITION = - new AspectDefinition.Builder("all_attributes_aspect") + new AspectDefinition.Builder(ALL_ATTRIBUTES_ASPECT) .allAttributesAspect(ALL_ATTRIBUTES_ASPECT) .build(); @@ -250,7 +250,7 @@ public class TestAspects { public static final NativeAspectClass ALL_ATTRIBUTES_WITH_TOOL_ASPECT = new AllAttributesWithToolAspect(); private static final AspectDefinition ALL_ATTRIBUTES_WITH_TOOL_ASPECT_DEFINITION = - new AspectDefinition.Builder("all_attributes_with_tool_aspect") + new AspectDefinition.Builder(ALL_ATTRIBUTES_WITH_TOOL_ASPECT) .allAttributesAspect(ALL_ATTRIBUTES_WITH_TOOL_ASPECT) .add( attr("$tool", BuildType.LABEL) @@ -294,7 +294,7 @@ public class TestAspects { @Override public AspectDefinition getDefinition(AspectParameters aspectParameters) { AspectDefinition.Builder builder = - new AspectDefinition.Builder("parametrized_definition_aspect") + new AspectDefinition.Builder(PARAMETRIZED_DEFINITION_ASPECT) .attributeAspect("foo", this); ImmutableCollection<String> baz = aspectParameters.getAttribute("baz"); if (baz != null) { @@ -323,7 +323,7 @@ public class TestAspects { information.append(dep.getLabel()); } information.append("]"); - return new ConfiguredAspect.Builder(getClass().getName(), ruleContext) + return new ConfiguredAspect.Builder(this, parameters, ruleContext) .addProvider(new AspectInfo(collectAspectData(information.toString(), ruleContext))) .build(); } @@ -335,7 +335,7 @@ public class TestAspects { private static final AspectRequiringProvider ASPECT_REQUIRING_PROVIDER = new AspectRequiringProvider(); private static final AspectDefinition ASPECT_REQUIRING_PROVIDER_DEFINITION = - new AspectDefinition.Builder("requiring_provider") + new AspectDefinition.Builder(ASPECT_REQUIRING_PROVIDER) .requireProvider(RequiredProvider.class) .build(); @@ -349,7 +349,7 @@ public class TestAspects { public ConfiguredAspect create( ConfiguredTarget base, RuleContext ruleContext, AspectParameters parameters) { ruleContext.ruleWarning("Aspect warning on " + base.getTarget().getLabel()); - return new ConfiguredAspect.Builder("warning", ruleContext).build(); + return new ConfiguredAspect.Builder(this, parameters, ruleContext).build(); } @Override @@ -360,7 +360,7 @@ public class TestAspects { public static final WarningAspect WARNING_ASPECT = new WarningAspect(); private static final AspectDefinition WARNING_ASPECT_DEFINITION = - new AspectDefinition.Builder("warning") + new AspectDefinition.Builder(WARNING_ASPECT) .attributeAspect("bar", WARNING_ASPECT) .build(); @@ -385,7 +385,7 @@ public class TestAspects { public static final ErrorAspect ERROR_ASPECT = new ErrorAspect(); private static final AspectDefinition ERROR_ASPECT_DEFINITION = - new AspectDefinition.Builder("error") + new AspectDefinition.Builder(ERROR_ASPECT) .attributeAspect("bar", ERROR_ASPECT) .build(); |