Class Dependency

java.lang.Object
enterprises.iwakura.amber.Dependency

public class Dependency extends Object
Represents a dependency with its notation, group ID, name, and version.
  • Constructor Details

    • Dependency

      public Dependency(String notation)
      Constructs a Dependency object by parsing the given notation.
      Parameters:
      notation - the dependency notation in the format "groupId:name:version"
  • Method Details

    • getGroupIdAsPath

      public String getGroupIdAsPath()
      Converts the group ID to a path format by replacing dots with slashes.
      Returns:
      the group ID in path format
    • getFileName

      public String getFileName()
      Generates the expected filename for the dependency's JAR file.
      Returns:
      the filename in the format "name-version.jar"
    • toString

      public String toString()
      Returns the string representation of the dependency, which is its notation.
      Overrides:
      toString in class Object
      Returns:
      the dependency notation