/** * Sets or replaces all mappings from the specified map as entries for the {@link Module#getOptions() options} map. Nulls are not permitted * @param options The entries that will be added to the options map * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final Builder options(Map<String, ? extends Object> options) { this.options = ImmutableMap.builder(); return putAllOptions(options); }
/** * Fill a builder with attribute values from the provided {@code Module} 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(Module instance) { Preconditions.checkNotNull(instance, "instance"); name(instance.getName()); addAllProtos(instance.getProtos()); output(instance.getOutput()); putAllOptions(instance.getOptions()); usageIndex(instance.usageIndex()); return this; }