Class ImmutableMavenDependency

java.lang.Object
io.github.ascopes.protobufmavenplugin.dependencies.ImmutableMavenDependency
All Implemented Interfaces:
MavenArtifact, MavenDependency

@Generated(from="MavenDependency", generator="Immutables") @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 @Nullable String getGroupId()
      Specified by:
      getGroupId in interface MavenArtifact
      Returns:
      The value of the groupId attribute
    • getArtifactId

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

      public @Nullable 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 MavenDependency
      Returns:
      The value of the dependencyResolutionDepth attribute
    • getExclusions

      public Set<MavenExclusionBean> getExclusions()
      Specified by:
      getExclusions in interface MavenDependency
      Returns:
      The value of the exclusions attribute
    • equals

      public boolean equals(@Nullable 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, exclusions.
      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(String | null) // nullable type
         .classifier(String | null) // nullable classifier
         .dependencyResolutionDepth(io.github.ascopes.protobufmavenplugin.dependencies.DependencyResolutionDepth | null) // nullable dependencyResolutionDepth
         .addExclusions|addAllExclusions(MavenExclusionBean) // exclusions elements
         .build();
      
      Returns:
      A new ImmutableMavenDependency builder