File tree Expand file tree Collapse file tree
src/main/java/com/google/api/generator/engine/ast Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717import com .google .auto .value .AutoValue ;
1818import com .google .common .base .Preconditions ;
1919import com .google .common .collect .ImmutableList ;
20+ import java .util .Arrays ;
2021import java .util .Collections ;
2122import java .util .List ;
2223
@@ -45,6 +46,10 @@ public static Builder builder() {
4546 public abstract static class Builder {
4647 public abstract Builder setType (TypeNode type );
4748
49+ public Builder setMethods (MethodDefinition ... methods ) {
50+ return setMethods (Arrays .asList (methods ));
51+ }
52+
4853 public abstract Builder setMethods (List <MethodDefinition > methods );
4954
5055 public abstract Builder setStatements (List <Statement > statements );
Original file line number Diff line number Diff line change 1616
1717import com .google .auto .value .AutoValue ;
1818import com .google .common .collect .ImmutableList ;
19+ import java .util .Arrays ;
1920import java .util .List ;
2021import java .util .Objects ;
2122import javax .annotation .Nullable ;
@@ -210,7 +211,11 @@ public abstract static class Builder {
210211
211212 public abstract Builder setWildcardUpperBound (Reference reference );
212213
213- public abstract Builder setGenerics (List <Reference > clazzes );
214+ public Builder setGenerics (Reference ... references ) {
215+ return setGenerics (Arrays .asList (references ));
216+ }
217+
218+ public abstract Builder setGenerics (List <Reference > references );
214219
215220 public abstract Builder setIsStaticImport (boolean isStaticImport );
216221
Original file line number Diff line number Diff line change 1717import com .google .auto .value .AutoValue ;
1818import com .google .common .base .Strings ;
1919import com .google .common .collect .ImmutableList ;
20+ import java .util .Arrays ;
2021import java .util .List ;
2122import java .util .Objects ;
2223import javax .annotation .Nullable ;
@@ -146,6 +147,10 @@ public abstract static class Builder {
146147
147148 public abstract Builder setUseFullName (boolean useFullName );
148149
150+ public Builder setGenerics (Reference ... references ) {
151+ return setGenerics (Arrays .asList (references ));
152+ }
153+
149154 public abstract Builder setGenerics (List <Reference > clazzes );
150155
151156 public abstract Builder setEnclosingClassName (String enclosingClassName );
You can’t perform that action at this time.
0 commit comments