Class ImmutableMavenExclusion.Builder
java.lang.Object
io.github.ascopes.protobufmavenplugin.dependencies.ImmutableMavenExclusion.Builder
- Enclosing class:
ImmutableMavenExclusion
@Generated(from="MavenExclusion",
generator="Immutables")
public static final class ImmutableMavenExclusion.Builder
extends Object
Builds instances of type
ImmutableMavenExclusion.
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 Summary
Modifier and TypeMethodDescriptionartifactId(String artifactId) Initializes the value for theartifactIdattribute.build()Builds a newImmutableMavenExclusion.classifier(String classifier) Initializes the value for theclassifierattribute.from(MavenExclusion instance) Fill a builder with attribute values from the providedMavenExclusioninstance.Initializes the value for thegroupIdattribute.Initializes the value for thetypeattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedMavenExclusioninstance. 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:
thisbuilder for use in a chained invocation
-
groupId
Initializes the value for thegroupIdattribute.- Parameters:
groupId- The value for groupId (can benull)- Returns:
thisbuilder for use in a chained invocation
-
artifactId
Initializes the value for theartifactIdattribute.- Parameters:
artifactId- The value for artifactId (can benull)- Returns:
thisbuilder for use in a chained invocation
-
classifier
Initializes the value for theclassifierattribute.If not set, this attribute will have a default value as returned by the initializer of
classifier.- Parameters:
classifier- The value for classifier- Returns:
thisbuilder for use in a chained invocation
-
type
-
build
Builds a newImmutableMavenExclusion.- Returns:
- An immutable instance of MavenExclusion
- Throws:
IllegalStateException- if any required attributes are missing
-