Class MavenProtocPluginBean
java.lang.Object
io.github.ascopes.protobufmavenplugin.plugins.MavenProtocPluginBean
- All Implemented Interfaces:
MavenArtifact
,MavenProtocPlugin
,ProtocPlugin
@Generated({"Modifiables.generator","MavenProtocPlugin"})
public class MavenProtocPluginBean
extends Object
implements MavenProtocPlugin
A modifiable implementation of the
MavenProtocPlugin
type.
Use the constructor to create new modifiable instances. You may even extend this class to add some convenience methods, however most of the methods in this class are final to preserve safety and predictable invariants.
MavenProtocPluginBean is not thread-safe
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAllJvmArgs
(Iterable<String> elements) Adds elements tojvmArgs
list.void
addAllJvmConfigArgs
(Iterable<String> elements) Adds elements tojvmConfigArgs
list.void
addJvmArgs
(String element) Adds one element tojvmArgs
list.final void
addJvmArgs
(String... elements) Adds elements tojvmArgs
list.void
addJvmConfigArgs
(String element) Adds one element tojvmConfigArgs
list.final void
addJvmConfigArgs
(String... elements) Adds elements tojvmConfigArgs
list.final boolean
Returnstrue
if the required attributeartifactId
is set.void
clear()
Clears the object by setting all attributes to their initial values.boolean
This instance is equal to all instances ofMavenProtocPluginBean
that have equal attribute values.from
(MavenArtifact instance) Fill this modifiable instance with attribute values from the providedMavenArtifact
instance.from
(MavenProtocPlugin instance) Fill this modifiable instance with attribute values from the providedMavenProtocPlugin
instance.from
(MavenProtocPluginBean instance) Fill this modifiable instance with attribute values from the providedMavenProtocPlugin
instance.from
(ProtocPlugin instance) Fill this modifiable instance with attribute values from the providedProtocPlugin
instance.Get the artifact ID.@Nullable String
Get the artifact classifier.Get the group ID.Get the command line arguments to pass to the JVM.Get the arguments to pass to the JVM to configure it.@Nullable String
The main class entrypoint to use if the plugin is not an assembled JAR.@Nullable String
int
getOrder()
@Nullable Path
@Nullable String
getType()
Get the artifact type.@NonNull String
Get the version of theprotoc
plugin.final boolean
Returnstrue
if the required attributegroupId
is set.int
hashCode()
Computes a hash code from attributes:groupId
,artifactId
,type
,classifier
,options
,outputDirectory
,registerAsCompilationRoot
,order
,skip
,version
,jvmArgs
,jvmConfigArgs
,mainClass
.final boolean
Returnstrue
if all required attributes are set, indicating that the object is initialized.@Nullable Boolean
boolean
isSkip()
final boolean
Returnstrue
if thejvmArgs
has not been initialized and will default to an empty list.final boolean
Returnstrue
if thejvmConfigArgs
has not been initialized and will default to an empty list.final boolean
Returnstrue
if the default attributeorder
is set.void
setArtifactId
(String artifactId) Assigns a value to theartifactId
attribute.void
setClassifier
(@Nullable String classifier) Assigns a value to theclassifier
attribute.void
setGroupId
(String groupId) Assigns a value to thegroupId
attribute.void
setJvmArgs
(@Nullable List<String> elements) Sets or replaces all elements forjvmArgs
list.void
setJvmConfigArgs
(@Nullable List<String> elements) Sets or replaces all elements forjvmConfigArgs
list.void
setMainClass
(@Nullable String mainClass) Assigns a value to themainClass
attribute.void
setOptions
(@Nullable String options) Assigns a value to theoptions
attribute.void
setOrder
(int order) Assigns a value to theorder
attribute.void
setOutputDirectory
(@Nullable Path outputDirectory) Assigns a value to theoutputDirectory
attribute.void
setRegisterAsCompilationRoot
(@Nullable Boolean registerAsCompilationRoot) Assigns a value to theregisterAsCompilationRoot
attribute.void
setSkip
(boolean skip) Assigns a value to theskip
attribute.void
Assigns a value to thetype
attribute.void
setVersion
(@NonNull String version) Assigns a value to theversion
attribute.final boolean
Returnstrue
if the default attributeskip
is set.Converts toImmutableMavenProtocPlugin
.toString()
Generates a string representation of thisMavenProtocPlugin
.final void
Reset an attribute to its initial value.final void
Reset an attribute to its initial value.final void
Reset an attribute to its initial value.final void
Reset an attribute to its initial value.final void
Reset an attribute to its initial value.final boolean
Returnstrue
if the required attributeversion
is set.
-
Constructor Details
-
MavenProtocPluginBean
public MavenProtocPluginBean()
-
-
Method Details
-
getGroupId
Get the group ID.- Specified by:
getGroupId
in interfaceMavenArtifact
- Returns:
- the group ID.
-
getArtifactId
Get the artifact ID.- Specified by:
getArtifactId
in interfaceMavenArtifact
- Returns:
- the artifact ID.
-
getType
Get the artifact type.May be
null
if the default should be used.- Specified by:
getType
in interfaceMavenArtifact
- Returns:
- the artifact type.
-
getClassifier
Get the artifact classifier.May be
null
if no classifier is set.- Specified by:
getClassifier
in interfaceMavenArtifact
- Returns:
- the artifact classifier.
-
getOptions
- Specified by:
getOptions
in interfaceProtocPlugin
- Returns:
- value of
options
attribute, may benull
-
getOutputDirectory
- Specified by:
getOutputDirectory
in interfaceProtocPlugin
- Returns:
- value of
outputDirectory
attribute, may benull
-
isRegisterAsCompilationRoot
- Specified by:
isRegisterAsCompilationRoot
in interfaceProtocPlugin
- Returns:
- value of
registerAsCompilationRoot
attribute, may benull
-
getOrder
public int getOrder()- Specified by:
getOrder
in interfaceProtocPlugin
- Returns:
- assigned or, otherwise, newly computed, not cached value of
order
attribute
-
isSkip
public boolean isSkip()- Specified by:
isSkip
in interfaceProtocPlugin
- Returns:
- assigned or, otherwise, newly computed, not cached value of
skip
attribute
-
getVersion
Get the version of theprotoc
plugin.This must be specified for plugins. The use of
<dependencyManagement/>
is ignored here.- Specified by:
getVersion
in interfaceMavenArtifact
- Specified by:
getVersion
in interfaceMavenProtocPlugin
- Returns:
- the protoc plugin version to use.
-
getJvmArgs
Get the command line arguments to pass to the JVM.This defaults to an empty list.
- Specified by:
getJvmArgs
in interfaceMavenProtocPlugin
- Returns:
- the list of command line arguments to pass to the JVM.
- Since:
- 2.6.0
-
getJvmConfigArgs
Get the arguments to pass to the JVM to configure it.Users can use this to control concerns such as heap memory controls, GC and JIT settings, and specifying additional JVM options.
- Specified by:
getJvmConfigArgs
in interfaceMavenProtocPlugin
- Returns:
- the list of command line arguments to pass to the JVM.
- Since:
- 2.6.0
-
getMainClass
The main class entrypoint to use if the plugin is not an assembled JAR.Ignored in all other cases.
- Specified by:
getMainClass
in interfaceMavenProtocPlugin
- Returns:
- the main class name.
- Since:
- 2.5.0
-
clear
public void clear()Clears the object by setting all attributes to their initial values. -
from
Fill this modifiable instance with attribute values from the providedMavenProtocPlugin
instance.- Parameters:
instance
- The instance from which to copy values
-
from
Fill this modifiable instance with attribute values from the providedProtocPlugin
instance.- Parameters:
instance
- The instance from which to copy values
-
from
Fill this modifiable instance with attribute values from the providedMavenArtifact
instance.- Parameters:
instance
- The instance from which to copy values
-
from
Fill this modifiable instance with attribute values from the providedMavenProtocPlugin
instance. Regular attribute values will be overridden, i.e. replaced with ones of an instance. Any of the instance's absent optional values will not be copied (will not override current values). Collection elements and entries will be added, not replaced.- Parameters:
instance
- The instance from which to copy values- Returns:
this
for use in a chained invocation
-
setGroupId
-
setArtifactId
Assigns a value to theartifactId
attribute.- Parameters:
artifactId
- The value for artifactId, can benull
-
setType
-
setClassifier
Assigns a value to theclassifier
attribute.- Parameters:
classifier
- The value for classifier, can benull
-
setOptions
-
setOutputDirectory
Assigns a value to theoutputDirectory
attribute.- Parameters:
outputDirectory
- The value for outputDirectory, can benull
-
setRegisterAsCompilationRoot
Assigns a value to theregisterAsCompilationRoot
attribute.- Parameters:
registerAsCompilationRoot
- The value for registerAsCompilationRoot, can benull
-
setOrder
-
setSkip
-
setVersion
-
addJvmArgs
-
addJvmArgs
-
setJvmArgs
-
addAllJvmArgs
-
addJvmConfigArgs
Adds one element tojvmConfigArgs
list.- Parameters:
element
- The jvmConfigArgs element
-
addJvmConfigArgs
Adds elements tojvmConfigArgs
list.- Parameters:
elements
- An array of jvmConfigArgs elements
-
setJvmConfigArgs
Sets or replaces all elements forjvmConfigArgs
list.- Parameters:
elements
- An iterable of jvmConfigArgs elements, can benull
-
addAllJvmConfigArgs
Adds elements tojvmConfigArgs
list.- Parameters:
elements
- An iterable of jvmConfigArgs elements
-
setMainClass
-
groupIdIsSet
public final boolean groupIdIsSet()Returnstrue
if the required attributegroupId
is set.- Returns:
true
if set
-
artifactIdIsSet
public final boolean artifactIdIsSet()Returnstrue
if the required attributeartifactId
is set.- Returns:
true
if set
-
versionIsSet
public final boolean versionIsSet()Returnstrue
if the required attributeversion
is set.- Returns:
true
if set
-
orderIsSet
public final boolean orderIsSet()Returnstrue
if the default attributeorder
is set.- Returns:
true
if set
-
skipIsSet
public final boolean skipIsSet()Returnstrue
if the default attributeskip
is set.- Returns:
true
if set
-
jvmArgsIsSet
public final boolean jvmArgsIsSet()Returnstrue
if thejvmArgs
has not been initialized and will default to an empty list.- Returns:
true
if set
-
jvmConfigArgsIsSet
public final boolean jvmConfigArgsIsSet()Returnstrue
if thejvmConfigArgs
has not been initialized and will default to an empty list.- Returns:
true
if set
-
unsetGroupId
public final void unsetGroupId()Reset an attribute to its initial value. -
unsetArtifactId
public final void unsetArtifactId()Reset an attribute to its initial value. -
unsetVersion
public final void unsetVersion()Reset an attribute to its initial value. -
unsetOrder
public final void unsetOrder()Reset an attribute to its initial value. -
unsetSkip
public final void unsetSkip()Reset an attribute to its initial value. -
isInitialized
public final boolean isInitialized()Returnstrue
if all required attributes are set, indicating that the object is initialized.- Returns:
true
if set
-
toImmutable
Converts toImmutableMavenProtocPlugin
.- Returns:
- An immutable instance of MavenProtocPlugin
-
equals
-
hashCode
-
toString
-