Package org.pkl.core.packages
Class DependencyMetadata
java.lang.Object
org.pkl.core.packages.DependencyMetadata
Java representation of a package's dependency metadata.
Sample metadata:
{
"name": "my-proj-name",
"packageUri": "package://example.com/my-proj-name@0.5.3",
"version": "0.5.3",
"packageZipChecksums": {
"sha256": "abc123",
}
"packageZipUrl": "https://example.com/foo/bar@0.5.3.zip",
"sourceCodeUrlScheme": "https://github.com/foo/bar/blob/v0.5.3/%{path}#L%{line}-L%{endLine}",
"documentation": "https://my/docs",
"description": "The description for my package",
"issueTracker": "https://example.com/my/issues",
"sourceCode": "https://github.com/foo/bar",
"license": "Apache-2",
"dependencies": {
"foo": {
"uri": "package://example.com/foo@0.5.3",
"checksums": {
"sha256": "abc123"
}
}
}
}
-
Constructor Summary
ConstructorsConstructorDescriptionDependencyMetadata(String name, PackageUri packageUri, Version version, URI packageZipUrl, Checksums packageZipChecksums, Map<String, Dependency.RemoteDependency> dependencies, @Nullable String sourceCodeUrlScheme, @Nullable URI sourceCode, @Nullable URI documentation, @Nullable String license, @Nullable String licenseText, @Nullable List<String> authors, @Nullable URI issueTracker, @Nullable String description) -
Method Summary
Modifier and TypeMethodDescriptionbooleangetName()inthashCode()static DependencyMetadataparseAuthors(Object obj) static ChecksumsparseChecksums(Object obj) toString()voidwriteTo(OutputStream out) Serializes project dependencies to JSON, and writes it to the provided output stream.
-
Constructor Details
-
DependencyMetadata
public DependencyMetadata(String name, PackageUri packageUri, Version version, URI packageZipUrl, Checksums packageZipChecksums, Map<String, Dependency.RemoteDependency> dependencies, @Nullable @Nullable String sourceCodeUrlScheme, @Nullable @Nullable URI sourceCode, @Nullable @Nullable URI documentation, @Nullable @Nullable String license, @Nullable @Nullable String licenseText, @Nullable @Nullable List<String> authors, @Nullable @Nullable URI issueTracker, @Nullable @Nullable String description)
-
-
Method Details
-
parse
- Throws:
Json.JsonParseException
-
parseChecksums
- Throws:
Json.JsonParseException
-
parseAuthors
- Throws:
Json.JsonParseException
-
getName
-
getVersion
-
getPackageZipUrl
-
getPackageZipChecksums
-
getDependencies
-
getSourceCodeUrlScheme
-
getSourceCode
-
getDocumentation
-
getLicense
-
getLicenseText
-
getAuthors
-
getIssueTracker
-
getDescription
-
writeTo
Serializes project dependencies to JSON, and writes it to the provided output stream.- Throws:
IOException
-
equals
-
hashCode
public int hashCode() -
toString
-