ModuleVersionKey

class ModuleVersionKey : Comparable<Repository.ModuleVersionKey>

An immutable key which specifies a version of some module. It includes whether the module's name refers to a package (a directory), and the digest of the file's contents.

Constructors

Link copied to clipboard
fun ModuleVersionKey(moduleName: ResolvedModuleName, sourceDigest: ByteArray)

Construct a new ModuleVersionKey.

Functions

Link copied to clipboard
open operator override fun compareTo(other: Repository.ModuleVersionKey): Int
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
fun write(binaryStream: DataOutputStream)

Output this module version key to the provided DataOutputStream. An equal key can later be rebuilt via the constructor taking a DataInputStream.

Properties

Link copied to clipboard
val shortString: String

Answer a short identifier of the module version. Use a short prefix of the digest.

Link copied to clipboard
val sourceDigest: ByteArray

The SHA256 digest of the UTF-8 representation of the module's source code.