Class ImmutableMavenProtocPlugin.Builder

java.lang.Object
io.github.ascopes.protobufmavenplugin.plugins.ImmutableMavenProtocPlugin.Builder
Enclosing class:
ImmutableMavenProtocPlugin

public static final class ImmutableMavenProtocPlugin.Builder extends Object
Builds instances of type ImmutableMavenProtocPlugin. 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 MavenProtocPluginBean 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.plugins.MavenProtocPlugin instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      public final ImmutableMavenProtocPlugin.Builder from(ProtocPlugin instance)
      Fill a builder with attribute values from the provided io.github.ascopes.protobufmavenplugin.plugins.ProtocPlugin instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      public final ImmutableMavenProtocPlugin.Builder from(MavenArtifact instance)
      Fill a builder with attribute values from the provided io.github.ascopes.protobufmavenplugin.dependencies.MavenArtifact instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • groupId

      public final ImmutableMavenProtocPlugin.Builder groupId(String groupId)
      Initializes the value for the groupId attribute.
      Parameters:
      groupId - The value for groupId (can be null)
      Returns:
      this builder for use in a chained invocation
    • artifactId

      public final ImmutableMavenProtocPlugin.Builder artifactId(String artifactId)
      Initializes the value for the artifactId attribute.
      Parameters:
      artifactId - The value for artifactId (can be null)
      Returns:
      this builder for use in a chained invocation
    • version

      public final ImmutableMavenProtocPlugin.Builder version(String version)
      Initializes the value for the version attribute.
      Parameters:
      version - The value for version (can be null)
      Returns:
      this builder for use in a chained invocation
    • type

      public final ImmutableMavenProtocPlugin.Builder type(@Nullable String type)
      Initializes the value for the type attribute.
      Parameters:
      type - The value for type (can be null)
      Returns:
      this builder for use in a chained invocation
    • classifier

      public final ImmutableMavenProtocPlugin.Builder classifier(@Nullable String classifier)
      Initializes the value for the classifier attribute.
      Parameters:
      classifier - The value for classifier (can be null)
      Returns:
      this builder for use in a chained invocation
    • options

      public final ImmutableMavenProtocPlugin.Builder options(@Nullable String options)
      Initializes the value for the options attribute.
      Parameters:
      options - The value for options (can be null)
      Returns:
      this builder for use in a chained invocation
    • order

      public final ImmutableMavenProtocPlugin.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
    • isSkip

      public final ImmutableMavenProtocPlugin.Builder isSkip(boolean isSkip)
      Initializes the value for the isSkip attribute.

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

      Parameters:
      isSkip - The value for isSkip
      Returns:
      this builder for use in a chained invocation
    • addJvmArgs

      public final ImmutableMavenProtocPlugin.Builder addJvmArgs(String element)
      Adds one element to jvmArgs list.
      Parameters:
      element - A jvmArgs element
      Returns:
      this builder for use in a chained invocation
    • addJvmArgs

      public final ImmutableMavenProtocPlugin.Builder addJvmArgs(String... elements)
      Adds elements to jvmArgs list.
      Parameters:
      elements - An array of jvmArgs elements
      Returns:
      this builder for use in a chained invocation
    • jvmArgs

      public final ImmutableMavenProtocPlugin.Builder jvmArgs(Iterable<String> elements)
      Sets or replaces all elements for jvmArgs list.
      Parameters:
      elements - An iterable of jvmArgs elements
      Returns:
      this builder for use in a chained invocation
    • addAllJvmArgs

      public final ImmutableMavenProtocPlugin.Builder addAllJvmArgs(Iterable<String> elements)
      Adds elements to jvmArgs list.
      Parameters:
      elements - An iterable of jvmArgs elements
      Returns:
      this builder for use in a chained invocation
    • addJvmConfigArgs

      public final ImmutableMavenProtocPlugin.Builder addJvmConfigArgs(String element)
      Adds one element to jvmConfigArgs list.
      Parameters:
      element - A jvmConfigArgs element
      Returns:
      this builder for use in a chained invocation
    • addJvmConfigArgs

      public final ImmutableMavenProtocPlugin.Builder addJvmConfigArgs(String... elements)
      Adds elements to jvmConfigArgs list.
      Parameters:
      elements - An array of jvmConfigArgs elements
      Returns:
      this builder for use in a chained invocation
    • jvmConfigArgs

      public final ImmutableMavenProtocPlugin.Builder jvmConfigArgs(Iterable<String> elements)
      Sets or replaces all elements for jvmConfigArgs list.
      Parameters:
      elements - An iterable of jvmConfigArgs elements
      Returns:
      this builder for use in a chained invocation
    • addAllJvmConfigArgs

      public final ImmutableMavenProtocPlugin.Builder addAllJvmConfigArgs(Iterable<String> elements)
      Adds elements to jvmConfigArgs list.
      Parameters:
      elements - An iterable of jvmConfigArgs elements
      Returns:
      this builder for use in a chained invocation
    • mainClass

      public final ImmutableMavenProtocPlugin.Builder mainClass(@Nullable String mainClass)
      Initializes the value for the mainClass attribute.
      Parameters:
      mainClass - The value for mainClass (can be null)
      Returns:
      this builder for use in a chained invocation
    • build

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