Class ImmutableMavenProtocPlugin.Builder
java.lang.Object
io.github.ascopes.protobufmavenplugin.plugins.ImmutableMavenProtocPlugin.Builder
- Enclosing class:
ImmutableMavenProtocPlugin
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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
private @Nullable String
private List
<MavenExclusionBean> private String
private static final long
private static final long
private static final long
private long
private boolean
private @Nullable String
private static final long
private static final long
private long
private @Nullable String
private int
private @Nullable String
private @NonNull String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAllExclusions
(Iterable<? extends MavenExclusionBean> elements) Adds elements toexclusions
set.addAllJvmArgs
(Iterable<String> elements) Adds elements tojvmArgs
list.addAllJvmConfigArgs
(Iterable<String> elements) Adds elements tojvmConfigArgs
list.addExclusions
(MavenExclusionBean element) Adds one element toexclusions
set.addExclusions
(MavenExclusionBean... elements) Adds elements toexclusions
set.addJvmArgs
(String element) Adds one element tojvmArgs
list.addJvmArgs
(String... elements) Adds elements tojvmArgs
list.addJvmConfigArgs
(String element) Adds one element tojvmConfigArgs
list.addJvmConfigArgs
(String... elements) Adds elements tojvmConfigArgs
list.artifactId
(String artifactId) Initializes the value for theartifactId
attribute.build()
Builds a newImmutableMavenProtocPlugin
.classifier
(@Nullable String classifier) Initializes the value for theclassifier
attribute.exclusions
(Iterable<? extends MavenExclusionBean> elements) Sets or replaces all elements forexclusions
set.private String
private void
from
(MavenArtifact instance) Fill a builder with attribute values from the providedio.github.ascopes.protobufmavenplugin.dependencies.MavenArtifact
instance.from
(MavenProtocPlugin instance) Fill a builder with attribute values from the providedio.github.ascopes.protobufmavenplugin.plugins.MavenProtocPlugin
instance.from
(MavenProtocPluginBean instance) Fill a builder with attribute values from the providedMavenProtocPluginBean
instance.from
(ProtocPlugin instance) Fill a builder with attribute values from the providedio.github.ascopes.protobufmavenplugin.plugins.ProtocPlugin
instance.Initializes the value for thegroupId
attribute.isSkip
(boolean isSkip) Initializes the value for theisSkip
attribute.private boolean
Sets or replaces all elements forjvmArgs
list.jvmConfigArgs
(Iterable<String> elements) Sets or replaces all elements forjvmConfigArgs
list.Initializes the value for themainClass
attribute.Initializes the value for theoptions
attribute.order
(int order) Initializes the value for theorder
attribute.private boolean
Initializes the value for thetype
attribute.Initializes the value for theversion
attribute.
-
Field Details
-
INIT_BIT_GROUP_ID
private static final long INIT_BIT_GROUP_ID- See Also:
-
INIT_BIT_ARTIFACT_ID
private static final long INIT_BIT_ARTIFACT_ID- See Also:
-
INIT_BIT_VERSION
private static final long INIT_BIT_VERSION- See Also:
-
OPT_BIT_ORDER
private static final long OPT_BIT_ORDER- See Also:
-
OPT_BIT_IS_SKIP
private static final long OPT_BIT_IS_SKIP- See Also:
-
initBits
private long initBits -
optBits
private long optBits -
groupId
-
artifactId
-
type
-
classifier
-
exclusions
-
options
-
order
private int order -
isSkip
private boolean isSkip -
version
-
jvmArgs
-
jvmConfigArgs
-
mainClass
-
-
Constructor Details
-
Builder
private Builder()
-
-
Method Details
-
from
Fill a builder with attribute values from the providedMavenProtocPluginBean
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 providedio.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
Fill a builder with attribute values from the providedio.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
Fill a builder with attribute values from the providedio.github.ascopes.protobufmavenplugin.dependencies.MavenArtifact
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
-
groupId
Initializes the value for thegroupId
attribute.- Parameters:
groupId
- The value for groupId (can benull
)- Returns:
this
builder for use in a chained invocation
-
artifactId
Initializes the value for theartifactId
attribute.- Parameters:
artifactId
- The value for artifactId (can benull
)- Returns:
this
builder for use in a chained invocation
-
type
Initializes the value for thetype
attribute.- Parameters:
type
- The value for type (can benull
)- Returns:
this
builder for use in a chained invocation
-
classifier
Initializes the value for theclassifier
attribute.- Parameters:
classifier
- The value for classifier (can benull
)- Returns:
this
builder for use in a chained invocation
-
addExclusions
Adds one element toexclusions
set.- Parameters:
element
- A exclusions element- Returns:
this
builder for use in a chained invocation
-
addExclusions
Adds elements toexclusions
set.- Parameters:
elements
- An array of exclusions elements- Returns:
this
builder for use in a chained invocation
-
exclusions
public final ImmutableMavenProtocPlugin.Builder exclusions(Iterable<? extends MavenExclusionBean> elements) Sets or replaces all elements forexclusions
set.- Parameters:
elements
- An iterable of exclusions elements- Returns:
this
builder for use in a chained invocation
-
addAllExclusions
public final ImmutableMavenProtocPlugin.Builder addAllExclusions(Iterable<? extends MavenExclusionBean> elements) Adds elements toexclusions
set.- Parameters:
elements
- An iterable of exclusions elements- Returns:
this
builder for use in a chained invocation
-
options
Initializes the value for theoptions
attribute.- Parameters:
options
- The value for options (can benull
)- Returns:
this
builder for use in a chained invocation
-
order
-
isSkip
-
version
Initializes the value for theversion
attribute.- Parameters:
version
- The value for version (can benull
)- Returns:
this
builder for use in a chained invocation
-
addJvmArgs
Adds one element tojvmArgs
list.- Parameters:
element
- A jvmArgs element- Returns:
this
builder for use in a chained invocation
-
addJvmArgs
Adds elements tojvmArgs
list.- Parameters:
elements
- An array of jvmArgs elements- Returns:
this
builder for use in a chained invocation
-
jvmArgs
Sets or replaces all elements forjvmArgs
list.- Parameters:
elements
- An iterable of jvmArgs elements- Returns:
this
builder for use in a chained invocation
-
addAllJvmArgs
Adds elements tojvmArgs
list.- Parameters:
elements
- An iterable of jvmArgs elements- Returns:
this
builder for use in a chained invocation
-
addJvmConfigArgs
Adds one element tojvmConfigArgs
list.- Parameters:
element
- A jvmConfigArgs element- Returns:
this
builder for use in a chained invocation
-
addJvmConfigArgs
Adds elements tojvmConfigArgs
list.- Parameters:
elements
- An array of jvmConfigArgs elements- Returns:
this
builder for use in a chained invocation
-
jvmConfigArgs
Sets or replaces all elements forjvmConfigArgs
list.- Parameters:
elements
- An iterable of jvmConfigArgs elements- Returns:
this
builder for use in a chained invocation
-
addAllJvmConfigArgs
Adds elements tojvmConfigArgs
list.- Parameters:
elements
- An iterable of jvmConfigArgs elements- Returns:
this
builder for use in a chained invocation
-
mainClass
Initializes the value for themainClass
attribute.- Parameters:
mainClass
- The value for mainClass (can benull
)- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableMavenProtocPlugin
.- Returns:
- An immutable instance of MavenProtocPlugin
- Throws:
IllegalStateException
- if any required attributes are missing
-
orderIsSet
private boolean orderIsSet() -
isSkipIsSet
private boolean isSkipIsSet() -
formatRequiredAttributesMessage
-