Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ggj][ast] fix: add varargs to AnonClass and Ref setter methods #400

Merged
merged 5 commits into from
Oct 24, 2020
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import com.google.auto.value.AutoValue;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

Expand Down Expand Up @@ -45,6 +46,10 @@ public static Builder builder() {
public abstract static class Builder {
public abstract Builder setType(TypeNode type);

public Builder setMethods(MethodDefinition... methods) {
return setMethods(Arrays.asList(methods));
}

public abstract Builder setMethods(List<MethodDefinition> methods);

public abstract Builder setStatements(List<Statement> statements);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import com.google.auto.value.AutoValue;
import com.google.common.collect.ImmutableList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import javax.annotation.Nullable;
Expand Down Expand Up @@ -210,7 +211,11 @@ public abstract static class Builder {

public abstract Builder setWildcardUpperBound(Reference reference);

public abstract Builder setGenerics(List<Reference> clazzes);
public Builder setGenerics(Reference... references) {
return setGenerics(Arrays.asList(references));
}

public abstract Builder setGenerics(List<Reference> references);

public abstract Builder setIsStaticImport(boolean isStaticImport);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import com.google.auto.value.AutoValue;
import com.google.common.base.Strings;
import com.google.common.collect.ImmutableList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import javax.annotation.Nullable;
Expand Down Expand Up @@ -146,6 +147,10 @@ public abstract static class Builder {

public abstract Builder setUseFullName(boolean useFullName);

public Builder setGenerics(Reference... references) {
return setGenerics(Arrays.asList(references));
}

public abstract Builder setGenerics(List<Reference> clazzes);

public abstract Builder setEnclosingClassName(String enclosingClassName);
Expand Down