Package org.pkl.core
Record Class Release
java.lang.Object
java.lang.Record
org.pkl.core.Release
- Record Components:
version- the version of this releaseos- the operating system (name and version) this release is running onflavor- the flavor of this release (native, or Java and JVM version)versionInfo- the output ofpkl --versionfor this releasecommitId- the Git commit ID of this releasesourceCode- the source code of this releasedocumentation- the documentation of this releasestandardLibrary- the standard library of this release
public record Release(Version version, String os, String flavor, String versionInfo, String commitId, Release.SourceCode sourceCode, Release.Documentation documentation, Release.StandardLibrary standardLibrary)
extends Record
Information about the Pkl release that the current program runs on. This class is the Java
equivalent of standard library module
pkl.release.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordThe documentation of a Pkl release.static final recordThe source code of a Pkl release.static final recordThe standard library of a Pkl release. -
Constructor Summary
ConstructorsConstructorDescriptionRelease(Version version, String os, String flavor, String versionInfo, String commitId, Release.SourceCode sourceCode, Release.Documentation documentation, Release.StandardLibrary standardLibrary) Creates an instance of aReleaserecord class. -
Method Summary
Modifier and TypeMethodDescriptioncommitId()Returns the value of thecommitIdrecord component.static Releasecurrent()The Pkl release that the current program runs on.Returns the value of thedocumentationrecord component.final booleanIndicates whether some other object is "equal to" this one.flavor()Returns the value of theflavorrecord component.final inthashCode()Returns a hash code value for this object.os()Returns the value of theosrecord component.Returns the value of thesourceCoderecord component.Returns the value of thestandardLibraryrecord component.final StringtoString()Returns a string representation of this record class.version()Returns the value of theversionrecord component.Returns the value of theversionInforecord component.
-
Constructor Details
-
Release
public Release(Version version, String os, String flavor, String versionInfo, String commitId, Release.SourceCode sourceCode, Release.Documentation documentation, Release.StandardLibrary standardLibrary) Creates an instance of aReleaserecord class.- Parameters:
version- the value for theversionrecord componentos- the value for theosrecord componentflavor- the value for theflavorrecord componentversionInfo- the value for theversionInforecord componentcommitId- the value for thecommitIdrecord componentsourceCode- the value for thesourceCoderecord componentdocumentation- the value for thedocumentationrecord componentstandardLibrary- the value for thestandardLibraryrecord component
-
-
Method Details
-
current
The Pkl release that the current program runs on. -
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. -
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. -
equals
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. All components in this record class are compared withObjects::equals(Object,Object). -
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
os
Returns the value of theosrecord component.- Returns:
- the value of the
osrecord component
-
flavor
Returns the value of theflavorrecord component.- Returns:
- the value of the
flavorrecord component
-
versionInfo
Returns the value of theversionInforecord component.- Returns:
- the value of the
versionInforecord component
-
commitId
Returns the value of thecommitIdrecord component.- Returns:
- the value of the
commitIdrecord component
-
sourceCode
Returns the value of thesourceCoderecord component.- Returns:
- the value of the
sourceCoderecord component
-
documentation
Returns the value of thedocumentationrecord component.- Returns:
- the value of the
documentationrecord component
-
standardLibrary
Returns the value of thestandardLibraryrecord component.- Returns:
- the value of the
standardLibraryrecord component
-