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.

  • Field Details

    • INIT_BIT_LANGUAGE

      private static final long INIT_BIT_LANGUAGE
      See Also:
    • INIT_BIT_OUTPUT_PATH

      private static final long INIT_BIT_OUTPUT_PATH
      See Also:
    • INIT_BIT_IS_LITE

      private static final long INIT_BIT_IS_LITE
      See Also:
    • OPT_BIT_ORDER

      private static final long OPT_BIT_ORDER
      See Also:
    • initBits

      private long initBits
    • optBits

      private long optBits
    • order

      private int order
    • language

      private Language language
    • outputPath

      private Path outputPath
    • isLite

      private boolean isLite
  • Constructor Details

    • Builder

      private Builder()
  • 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
    • from

      private void from(short _unused, Object object)
    • 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
    • isLite

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

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

      private boolean orderIsSet()
    • formatRequiredAttributesMessage

      private String formatRequiredAttributesMessage()