Class ImmutableFilesToCompile.Builder

java.lang.Object
io.github.ascopes.protobufmavenplugin.sources.ImmutableFilesToCompile.Builder
Enclosing class:
ImmutableFilesToCompile

public static final class ImmutableFilesToCompile.Builder extends Object
Builds instances of type ImmutableFilesToCompile. 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.

  • Field Details

    • INIT_BIT_PROTO_SOURCES

      private static final long INIT_BIT_PROTO_SOURCES
      See Also:
    • INIT_BIT_DESCRIPTOR_FILES

      private static final long INIT_BIT_DESCRIPTOR_FILES
      See Also:
    • initBits

      private long initBits
    • protoSources

      private Collection<Path> protoSources
    • descriptorFiles

      private Collection<String> descriptorFiles
  • Constructor Details

    • Builder

      private Builder()
  • Method Details

    • from

      public final ImmutableFilesToCompile.Builder from(FilesToCompile instance)
      Fill a builder with attribute values from the provided FilesToCompile instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • protoSources

      public final ImmutableFilesToCompile.Builder protoSources(Collection<Path> protoSources)
      Initializes the value for the protoSources attribute.
      Parameters:
      protoSources - The value for protoSources (can be null)
      Returns:
      this builder for use in a chained invocation
    • descriptorFiles

      public final ImmutableFilesToCompile.Builder descriptorFiles(Collection<String> descriptorFiles)
      Initializes the value for the descriptorFiles attribute.
      Parameters:
      descriptorFiles - The value for descriptorFiles (can be null)
      Returns:
      this builder for use in a chained invocation
    • build

      public ImmutableFilesToCompile build()
      Returns:
      An immutable instance of FilesToCompile
      Throws:
      IllegalStateException - if any required attributes are missing
    • formatRequiredAttributesMessage

      private String formatRequiredAttributesMessage()