Class MavenDependencyBean
java.lang.Object
io.github.ascopes.protobufmavenplugin.dependencies.MavenDependencyBean
- All Implemented Interfaces:
MavenArtifact, MavenDependency
@Generated(from="MavenDependency",
generator="Modifiables")
@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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAllExclusions(Iterable<? extends @Nullable MavenExclusionBean> elements) Adds elements toexclusionsset.final voidaddExclusions(@Nullable MavenExclusionBean... elements) Adds elements toexclusionsset.voidaddExclusions(MavenExclusionBean element) Adds one element toexclusionsset.final booleanReturnstrueif the required attributeartifactIdis set.voidclear()Clears the object by setting all attributes to their initial values.booleanThis instance is equal to all instances ofMavenDependencyBeanthat have equal attribute values.final booleanReturnstrueif theexclusionshas not been initialized and will default to an empty set.from(MavenArtifact instance) Fill this modifiable instance with attribute values from the providedMavenArtifactinstance.from(MavenDependency instance) Fill this modifiable instance with attribute values from the providedMavenDependencyinstance.from(MavenDependencyBean instance) Fill this modifiable instance with attribute values from the providedMavenDependencyinstance.@Nullable String@Nullable DependencyResolutionDepth@Nullable StringgetType()@Nullable Stringfinal booleanReturnstrueif the required attributegroupIdis set.inthashCode()Computes a hash code from attributes:groupId,artifactId,version,type,classifier,dependencyResolutionDepth,exclusions.final booleanReturnstrueif all required attributes are set, indicating that the object is initialized.voidsetArtifactId(String artifactId) Assigns a value to theartifactIdattribute.voidsetClassifier(@Nullable String classifier) Assigns a value to theclassifierattribute.voidsetDependencyResolutionDepth(@Nullable DependencyResolutionDepth dependencyResolutionDepth) Assigns a value to thedependencyResolutionDepthattribute.voidsetExclusions(Set<MavenExclusionBean> elements) Sets or replaces all elements forexclusionsset.voidsetGroupId(String groupId) Assigns a value to thegroupIdattribute.voidAssigns a value to thetypeattribute.voidsetVersion(@Nullable String version) Assigns a value to theversionattribute.final ImmutableMavenDependencyConverts toImmutableMavenDependency.toString()Generates a string representation of thisMavenDependency.final voidReset an attribute to its initial value.final voidReset an attribute to its initial value.
-
Constructor Details
-
MavenDependencyBean
public MavenDependencyBean()
-
-
Method Details
-
getGroupId
- Specified by:
getGroupIdin interfaceMavenArtifact- Returns:
- value of
groupIdattribute, may benull
-
getArtifactId
- Specified by:
getArtifactIdin interfaceMavenArtifact- Returns:
- value of
artifactIdattribute, may benull
-
getVersion
- Specified by:
getVersionin interfaceMavenArtifact- Returns:
- value of
versionattribute, may benull
-
getType
- Specified by:
getTypein interfaceMavenArtifact- Returns:
- value of
typeattribute, may benull
-
getClassifier
- Specified by:
getClassifierin interfaceMavenArtifact- Returns:
- value of
classifierattribute, may benull
-
getDependencyResolutionDepth
- Specified by:
getDependencyResolutionDepthin interfaceMavenDependency- Returns:
- value of
dependencyResolutionDepthattribute, may benull
-
getExclusions
- Specified by:
getExclusionsin interfaceMavenDependency- Returns:
- modifiable set
exclusions
-
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 providedMavenArtifactinstance.- Parameters:
instance- The instance from which to copy values
-
from
Fill this modifiable instance with attribute values from the providedMavenDependencyinstance.- Parameters:
instance- The instance from which to copy values
-
from
Fill this modifiable instance with attribute values from the providedMavenDependencyinstance. 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:
thisfor use in a chained invocation
-
setGroupId
-
setArtifactId
Assigns a value to theartifactIdattribute.- Parameters:
artifactId- The value for artifactId, can benull
-
setVersion
-
setType
-
setClassifier
Assigns a value to theclassifierattribute.- Parameters:
classifier- The value for classifier, can benull
-
setDependencyResolutionDepth
public void setDependencyResolutionDepth(@Nullable DependencyResolutionDepth dependencyResolutionDepth) Assigns a value to thedependencyResolutionDepthattribute.- Parameters:
dependencyResolutionDepth- The value for dependencyResolutionDepth, can benull
-
addExclusions
Adds one element toexclusionsset.- Parameters:
element- The exclusions element
-
addExclusions
Adds elements toexclusionsset.- Parameters:
elements- An array of exclusions elements
-
setExclusions
Sets or replaces all elements forexclusionsset.- Parameters:
elements- An iterable of exclusions elements
-
addAllExclusions
Adds elements toexclusionsset.- Parameters:
elements- An iterable of exclusions elements
-
groupIdIsSet
public final boolean groupIdIsSet()Returnstrueif the required attributegroupIdis set.- Returns:
trueif set
-
artifactIdIsSet
public final boolean artifactIdIsSet()Returnstrueif the required attributeartifactIdis set.- Returns:
trueif set
-
exclusionsIsSet
public final boolean exclusionsIsSet()Returnstrueif theexclusionshas not been initialized and will default to an empty set.- Returns:
trueif 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. -
isInitialized
public final boolean isInitialized()Returnstrueif all required attributes are set, indicating that the object is initialized.- Returns:
trueif set
-
toImmutable
Converts toImmutableMavenDependency.- Returns:
- An immutable instance of MavenDependency
-
equals
-
hashCode
-
toString
-