Class ImmutableModuleConfiguration.Builder

  • Enclosing class:
    ImmutableModuleConfiguration

    @NotThreadSafe
    public static final class ImmutableModuleConfiguration.Builder
    extends Object
    Builds instances of type ImmutableModuleConfiguration. Initialize attributes and then invoke the build() method to create an immutable instance.

    Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

    • Method Detail

      • from

        @CanIgnoreReturnValue
        public final ImmutableModuleConfiguration.Builder from​(ModuleConfiguration instance)
        Fill a builder with attribute values from the provided ModuleConfiguration 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.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • name

        @CanIgnoreReturnValue
        public final ImmutableModuleConfiguration.Builder name​(String name)
        Initializes the value for the name attribute.
        Parameters:
        name - The value for name
        Returns:
        this builder for use in a chained invocation
      • addIncludePaths

        @CanIgnoreReturnValue
        public final ImmutableModuleConfiguration.Builder addIncludePaths​(Path element)
        Adds one element to includePaths list.
        Parameters:
        element - A includePaths element
        Returns:
        this builder for use in a chained invocation
      • addIncludePaths

        @CanIgnoreReturnValue
        public final ImmutableModuleConfiguration.Builder addIncludePaths​(Path... elements)
        Adds elements to includePaths list.
        Parameters:
        elements - An array of includePaths elements
        Returns:
        this builder for use in a chained invocation
      • includePaths

        @CanIgnoreReturnValue
        public final ImmutableModuleConfiguration.Builder includePaths​(Iterable<? extends Path> elements)
        Sets or replaces all elements for includePaths list.
        Parameters:
        elements - An iterable of includePaths elements
        Returns:
        this builder for use in a chained invocation
      • addAllIncludePaths

        @CanIgnoreReturnValue
        public final ImmutableModuleConfiguration.Builder addAllIncludePaths​(Iterable<? extends Path> elements)
        Adds elements to includePaths list.
        Parameters:
        elements - An iterable of includePaths elements
        Returns:
        this builder for use in a chained invocation
      • addProtoFiles

        @CanIgnoreReturnValue
        public final ImmutableModuleConfiguration.Builder addProtoFiles​(String... elements)
        Adds elements to protoFiles list.
        Parameters:
        elements - An array of protoFiles elements
        Returns:
        this builder for use in a chained invocation
      • generator

        @CanIgnoreReturnValue
        public final ImmutableModuleConfiguration.Builder generator​(String generator)
        Initializes the value for the generator attribute.
        Parameters:
        generator - The value for generator
        Returns:
        this builder for use in a chained invocation
      • output

        @CanIgnoreReturnValue
        public final ImmutableModuleConfiguration.Builder output​(String output)
        Initializes the value for the output attribute.
        Parameters:
        output - The value for output
        Returns:
        this builder for use in a chained invocation
      • putOptions

        @CanIgnoreReturnValue
        public final ImmutableModuleConfiguration.Builder putOptions​(String key,
                                                                     Object value)
        Put one entry to the options map.
        Parameters:
        key - The key in the options map
        value - The associated value in the options map
        Returns:
        this builder for use in a chained invocation
      • options

        @CanIgnoreReturnValue
        public final ImmutableModuleConfiguration.Builder options​(Map<String,​? extends Object> entries)
        Sets or replaces all mappings from the specified map as entries for the options map. Nulls are not permitted
        Parameters:
        entries - The entries that will be added to the options map
        Returns:
        this builder for use in a chained invocation
      • putAllOptions

        @CanIgnoreReturnValue
        public final ImmutableModuleConfiguration.Builder putAllOptions​(Map<String,​? extends Object> entries)
        Put all mappings from the specified map as entries to options map. Nulls are not permitted
        Parameters:
        entries - The entries that will be added to the options map
        Returns:
        this builder for use in a chained invocation