/** * Sets or replaces all elements for {@link MethodCall#getParameters() parameters} list. * @param elements An iterable of parameters elements * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final Builder parameters(Iterable<String> elements) { this.parameters = ImmutableList.builder(); return addAllParameters(elements); }
/** * Fill a builder with attribute values from the provided {@code MethodCall} instance. * Regular attribute values will be replaced with those from the given instance. * Absent optional values will not replace present values. * Collection elements and entries will be added, not replaced. * @param instance The instance from which to copy values * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final Builder from(MethodCall instance) { Objects.requireNonNull(instance, "instance"); name(instance.getName()); addAllParameters(instance.getParameters()); return this; }
if (ctx.expressionlist() != null) { List<String> params = ctx.expressionlist().accept(paramsVisitor); methodBuilder.addAllParameters(params);