diff --git a/src/main/java/com/google/api/generator/engine/ast/AnonymousClassExpr.java b/src/main/java/com/google/api/generator/engine/ast/AnonymousClassExpr.java index 7cbce07ff0..e4ddc7e11d 100644 --- a/src/main/java/com/google/api/generator/engine/ast/AnonymousClassExpr.java +++ b/src/main/java/com/google/api/generator/engine/ast/AnonymousClassExpr.java @@ -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; @@ -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 methods); public abstract Builder setStatements(List statements); diff --git a/src/main/java/com/google/api/generator/engine/ast/ConcreteReference.java b/src/main/java/com/google/api/generator/engine/ast/ConcreteReference.java index 7d37a02417..58494fe7a5 100644 --- a/src/main/java/com/google/api/generator/engine/ast/ConcreteReference.java +++ b/src/main/java/com/google/api/generator/engine/ast/ConcreteReference.java @@ -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; @@ -210,7 +211,11 @@ public abstract static class Builder { public abstract Builder setWildcardUpperBound(Reference reference); - public abstract Builder setGenerics(List clazzes); + public Builder setGenerics(Reference... references) { + return setGenerics(Arrays.asList(references)); + } + + public abstract Builder setGenerics(List references); public abstract Builder setIsStaticImport(boolean isStaticImport); diff --git a/src/main/java/com/google/api/generator/engine/ast/VaporReference.java b/src/main/java/com/google/api/generator/engine/ast/VaporReference.java index c3b237bdf3..cd9361ebe3 100644 --- a/src/main/java/com/google/api/generator/engine/ast/VaporReference.java +++ b/src/main/java/com/google/api/generator/engine/ast/VaporReference.java @@ -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; @@ -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 clazzes); public abstract Builder setEnclosingClassName(String enclosingClassName);