Class ImmutableMavenDependency
java.lang.Object
io.github.ascopes.protobufmavenplugin.dependencies.ImmutableMavenDependency
- All Implemented Interfaces:
MavenArtifact
,MavenDependency
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableMavenDependency
extends Object
implements MavenDependency
Immutable implementation of
MavenDependency
.
Use the builder to create immutable instances:
ImmutableMavenDependency.builder()
.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableMavenDependency
. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forImmutableMavenDependency
.boolean
This instance is equal to all instances ofImmutableMavenDependency
that have equal attribute values.Get the artifact ID.@Nullable String
Get the artifact classifier.@Nullable DependencyResolutionDepth
Get the preferences for the depth of dependency resolution.Get a set of dependency exclusions to apply when resolving dependencies.Get the group ID.@Nullable String
getType()
Get the artifact type.@Nullable String
Get the artifact version.int
hashCode()
Computes a hash code from attributes:groupId
,artifactId
,version
,type
,classifier
,dependencyResolutionDepth
,exclusions
.toString()
Prints the immutable valueMavenDependency
with attribute values.
-
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.
-
getVersion
Get the artifact version.May be
null
if we expect to discover the version from dependency management.- Specified by:
getVersion
in interfaceMavenArtifact
- Returns:
- the version.
-
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.
-
getDependencyResolutionDepth
Get the preferences for the depth of dependency resolution.May be
null
if the default should be used.- Specified by:
getDependencyResolutionDepth
in interfaceMavenDependency
- Returns:
- the preference for the depth of dependency resolution.
-
getExclusions
Get a set of dependency exclusions to apply when resolving dependencies.- Specified by:
getExclusions
in interfaceMavenDependency
- Returns:
- the exclusions, which by default is empty if unspecified.
-
equals
-
hashCode
-
toString
-
builder
Creates a builder forImmutableMavenDependency
.ImmutableMavenDependency.builder() .groupId(String | null) // nullable
groupId
.artifactId(String | null) // nullableartifactId
.version(@org.jspecify.annotations.Nullable String | null) // nullableversion
.type(@org.jspecify.annotations.Nullable String | null) // nullabletype
.classifier(@org.jspecify.annotations.Nullable String | null) // nullableclassifier
.dependencyResolutionDepth(io.github.ascopes.protobufmavenplugin.dependencies.@org.jspecify.annotations.Nullable DependencyResolutionDepth | null) // nullabledependencyResolutionDepth
.addExclusions|addAllExclusions(MavenExclusionBean) //exclusions
elements .build();- Returns:
- A new ImmutableMavenDependency builder
-