Skip to content

Commit

Permalink
In RuleDefintion, use AutoValue and delete the checked-in generated c…
Browse files Browse the repository at this point in the history
…ode for it.

--
MOS_MIGRATED_REVID=119369970
  • Loading branch information
cgrushko authored and kchodorow committed Apr 8, 2016
1 parent fd308b6 commit 97f8148
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 181 deletions.
1 change: 1 addition & 0 deletions src/main/java/com/google/devtools/build/lib/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@ java_library(
"//src/main/protobuf:extra_actions_base_java_proto",
"//src/main/protobuf:invocation_policy_java_proto",
"//src/main/protobuf:test_status_java_proto",
"//third_party:auto_value",
"//third_party:guava",
"//third_party:jsr305",
"//third_party/protobuf",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

package com.google.devtools.build.lib.analysis;

import com.google.auto.value.AutoValue;
import com.google.devtools.build.lib.packages.RuleClass;
import com.google.devtools.build.lib.packages.RuleClass.Builder.RuleClassType;
import com.google.devtools.build.lib.rules.RuleConfiguredTargetFactory;
Expand Down Expand Up @@ -52,6 +53,7 @@ public interface RuleDefinition {
* Value class that contains the name, type, ancestors of a rule, as well as a reference to the
* configured target factory.
*/
@AutoValue
public abstract static class Metadata {
/**
* The name of the rule, as it appears in the BUILD file. If it starts with
Expand All @@ -78,7 +80,7 @@ public abstract static class Metadata {
public abstract List<Class<? extends RuleDefinition>> ancestors();

public static Builder builder() {
return new AutoValueRuleDefinitionMetadata.Builder()
return new AutoValue_RuleDefinition_Metadata.Builder()
.type(RuleClassType.NORMAL)
.factoryClass(RuleConfiguredTargetFactory.class)
.ancestors(Collections.<Class<? extends RuleDefinition>>emptyList());
Expand All @@ -91,6 +93,7 @@ public static Metadata empty() {
/**
* Builder class for the Metadata class.
*/
@AutoValue.Builder
public abstract static class Builder {
public abstract Builder name(String s);
public abstract Builder type(RuleClassType type);
Expand Down

0 comments on commit 97f8148

Please sign in to comment.