Class Dependency

java.lang.Object
io.codemodder.plugins.maven.operator.Dependency

public class Dependency extends Object
Represents a dependency in a Maven POM. A dependency consists of a group ID, artifact ID, version, classifier, packaging, and scope.
  • Constructor Details

    • Dependency

      public Dependency(String groupId, String artifactId, String version, String classifier, String packaging, String scope)
      Initializes a new Dependency object with the provided attributes.
      Parameters:
      groupId - The group ID of the dependency.
      artifactId - The artifact ID of the dependency.
      version - The version of the dependency.
      classifier - The classifier of the dependency (may be null).
      packaging - The packaging type of the dependency (default is "jar" if null).
      scope - The scope of the dependency (default is "compile" if null).
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getGroupId

      public String getGroupId()
    • setGroupId

      public void setGroupId(String groupId)
    • getArtifactId

      public String getArtifactId()
    • setArtifactId

      public void setArtifactId(String artifactId)
    • getVersion

      public String getVersion()
    • setVersion

      public void setVersion(String version)
    • getClassifier

      public String getClassifier()
    • setClassifier

      public void setClassifier(String classifier)
    • getPackaging

      public String getPackaging()
    • setPackaging

      public void setPackaging(String packaging)
    • getScope

      public String getScope()
    • setScope

      public void setScope(String scope)