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().

  • Method Details

    • getGroupId

      public String getGroupId()
      Specified by:
      getGroupId in interface MavenArtifact
      Returns:
      The value of the groupId attribute
    • getArtifactId

      public String getArtifactId()
      Specified by:
      getArtifactId in interface MavenArtifact
      Returns:
      The value of the artifactId attribute
    • getVersion

      public String getVersion()
      Specified by:
      getVersion in interface MavenArtifact
      Returns:
      The value of the version attribute
    • getType

      public @Nullable String getType()
      Specified by:
      getType in interface MavenArtifact
      Returns:
      The value of the type attribute
    • getClassifier

      public @Nullable String getClassifier()
      Specified by:
      getClassifier in interface MavenArtifact
      Returns:
      The value of the classifier attribute
    • getDependencyResolutionDepth

      public @Nullable DependencyResolutionDepth getDependencyResolutionDepth()
      Specified by:
      getDependencyResolutionDepth in interface MavenArtifact
      Returns:
      The value of the dependencyResolutionDepth attribute
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of ImmutableMavenDependency that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: groupId, artifactId, version, type, classifier, dependencyResolutionDepth.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value MavenDependency with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • builder

      public static ImmutableMavenDependency.Builder builder()
      Creates a builder for ImmutableMavenDependency.
       ImmutableMavenDependency.builder()
          .groupId(String | null) // nullable groupId
          .artifactId(String | null) // nullable artifactId
          .version(String | null) // nullable version
          .type(@org.jspecify.annotations.Nullable String | null) // nullable type
          .classifier(@org.jspecify.annotations.Nullable String | null) // nullable classifier
          .dependencyResolutionDepth(io.github.ascopes.protobufmavenplugin.dependencies.@org.jspecify.annotations.Nullable DependencyResolutionDepth | null) // nullable dependencyResolutionDepth
          .build();
       
      Returns:
      A new ImmutableMavenDependency builder