Class MavenDependencyBean
java.lang.Object
io.github.ascopes.protobufmavenplugin.dependencies.MavenDependencyBean
- All Implemented Interfaces:
MavenArtifact
,MavenDependency
@Generated({"Modifiables.generator","MavenDependency"})
public class MavenDependencyBean
extends Object
implements MavenDependency
A modifiable implementation of the
MavenDependency
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.
MavenDependencyBean is not thread-safe
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal 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 ofMavenDependencyBean
that have equal attribute values.from
(MavenArtifact instance) Fill this modifiable instance with attribute values from the providedMavenArtifact
instance.from
(MavenDependency instance) Fill this modifiable instance with attribute values from the providedMavenDependency
instance.from
(MavenDependencyBean instance) Fill this modifiable instance with attribute values from the providedMavenDependency
instance.@Nullable String
@Nullable DependencyResolutionDepth
@Nullable String
getType()
final boolean
Returnstrue
if the required attributegroupId
is set.int
hashCode()
Computes a hash code from attributes:groupId
,artifactId
,version
,type
,classifier
,dependencyResolutionDepth
.final boolean
Returnstrue
if all required attributes are set, indicating that the object is initialized.void
setArtifactId
(String artifactId) Assigns a value to theartifactId
attribute.void
setClassifier
(@Nullable String classifier) Assigns a value to theclassifier
attribute.void
setDependencyResolutionDepth
(@Nullable DependencyResolutionDepth dependencyResolutionDepth) Assigns a value to thedependencyResolutionDepth
attribute.void
setGroupId
(String groupId) Assigns a value to thegroupId
attribute.void
Assigns a value to thetype
attribute.void
setVersion
(String version) Assigns a value to theversion
attribute.final ImmutableMavenDependency
Converts toImmutableMavenDependency
.toString()
Generates a string representation of thisMavenDependency
.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
-
MavenDependencyBean
public MavenDependencyBean()
-
-
Method Details
-
getGroupId
- Specified by:
getGroupId
in interfaceMavenArtifact
- Returns:
- value of
groupId
attribute, may benull
-
getArtifactId
- Specified by:
getArtifactId
in interfaceMavenArtifact
- Returns:
- value of
artifactId
attribute, may benull
-
getVersion
- Specified by:
getVersion
in interfaceMavenArtifact
- Returns:
- value of
version
attribute, may benull
-
getType
- Specified by:
getType
in interfaceMavenArtifact
- Returns:
- value of
type
attribute, may benull
-
getClassifier
- Specified by:
getClassifier
in interfaceMavenArtifact
- Returns:
- value of
classifier
attribute, may benull
-
getDependencyResolutionDepth
- Specified by:
getDependencyResolutionDepth
in interfaceMavenArtifact
- Returns:
- value of
dependencyResolutionDepth
attribute, may benull
-
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 providedMavenArtifact
instance.- Parameters:
instance
- The instance from which to copy values
-
from
Fill this modifiable instance with attribute values from the providedMavenDependency
instance.- Parameters:
instance
- The instance from which to copy values
-
from
Fill this modifiable instance with attribute values from the providedMavenDependency
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).- 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
-
setVersion
-
setType
-
setClassifier
Assigns a value to theclassifier
attribute.- Parameters:
classifier
- The value for classifier, can benull
-
setDependencyResolutionDepth
public void setDependencyResolutionDepth(@Nullable DependencyResolutionDepth dependencyResolutionDepth) Assigns a value to thedependencyResolutionDepth
attribute.- Parameters:
dependencyResolutionDepth
- The value for dependencyResolutionDepth, can benull
-
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
-
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. -
isInitialized
public final boolean isInitialized()Returnstrue
if all required attributes are set, indicating that the object is initialized.- Returns:
true
if set
-
toImmutable
Converts toImmutableMavenDependency
.- Returns:
- An immutable instance of MavenDependency
-
equals
-
hashCode
-
toString
-