Record Class CopiedDependency

java.lang.Object
java.lang.Record
org.ek9lang.core.CopiedDependency

public record CopiedDependency(String vector, String moduleName, String version, boolean devOnly, Optional<String> zipSha256, List<CopiedFile> files) extends Record
One accepted dependency as copied into a project (.ek9/deps/<vector>/, D-M2): the vector it was resolved from (<module>-<version>), its module and version, whether it is compiled only in a dev build (reached only through the project's own devDeps), the SHA-256 of the library zip it was unpacked from (empty when it was installed unpacked only), and every file of the copy, sorted by path. Exactly what ek9.lock records for it (docs/implementation/EK9_P2_P3_PLAN.md §1.3, §2.1). Frozen for the P2/P3 lanes.
  • Constructor Details

    • CopiedDependency

      public CopiedDependency(String vector, String moduleName, String version, boolean devOnly, Optional<String> zipSha256, List<CopiedFile> files)
      Creates an instance of a CopiedDependency record class.
      Parameters:
      vector - the value for the vector record component
      moduleName - the value for the moduleName record component
      version - the value for the version record component
      devOnly - the value for the devOnly record component
      zipSha256 - the value for the zipSha256 record component
      files - the value for the files record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • vector

      public String vector()
      Returns the value of the vector record component.
      Returns:
      the value of the vector record component
    • moduleName

      public String moduleName()
      Returns the value of the moduleName record component.
      Returns:
      the value of the moduleName record component
    • version

      public String version()
      Returns the value of the version record component.
      Returns:
      the value of the version record component
    • devOnly

      public boolean devOnly()
      Returns the value of the devOnly record component.
      Returns:
      the value of the devOnly record component
    • zipSha256

      public Optional<String> zipSha256()
      Returns the value of the zipSha256 record component.
      Returns:
      the value of the zipSha256 record component
    • files

      public List<CopiedFile> files()
      Returns the value of the files record component.
      Returns:
      the value of the files record component