Class ImmutableLanguageProtocTarget.Builder

java.lang.Object
io.github.ascopes.protobufmavenplugin.protoc.targets.ImmutableLanguageProtocTarget.Builder
Enclosing class:
ImmutableLanguageProtocTarget

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

    • from

      Fill a builder with attribute values from the provided io.github.ascopes.protobufmavenplugin.protoc.targets.ProtocTarget instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      Fill a builder with attribute values from the provided io.github.ascopes.protobufmavenplugin.protoc.targets.LanguageProtocTarget instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • order

      public final ImmutableLanguageProtocTarget.Builder order(int order)
      Initializes the value for the order attribute.

      If not set, this attribute will have a default value as returned by the initializer of order.

      Parameters:
      order - The value for order
      Returns:
      this builder for use in a chained invocation
    • language

      public final ImmutableLanguageProtocTarget.Builder language(Language language)
      Initializes the value for the language attribute.
      Parameters:
      language - The value for language (can be null)
      Returns:
      this builder for use in a chained invocation
    • outputPath

      public final ImmutableLanguageProtocTarget.Builder outputPath(Path outputPath)
      Initializes the value for the outputPath attribute.
      Parameters:
      outputPath - The value for outputPath (can be null)
      Returns:
      this builder for use in a chained invocation
    • lite

      public final ImmutableLanguageProtocTarget.Builder lite(boolean lite)
      Initializes the value for the lite attribute.
      Parameters:
      lite - The value for lite
      Returns:
      this builder for use in a chained invocation
    • build

      Returns:
      An immutable instance of LanguageProtocTarget
      Throws:
      IllegalStateException - if any required attributes are missing