Package org.pkl.core

Record Class Release

java.lang.Object
java.lang.Record
org.pkl.core.Release
Record Components:
version - the version of this release
os - the operating system (name and version) this release is running on
flavor - the flavor of this release (native, or Java and JVM version)
versionInfo - the output of pkl --version for this release
commitId - the Git commit ID of this release
sourceCode - the source code of this release
documentation - the documentation of this release
standardLibrary - 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.
  • Constructor Details

  • Method Details

    • current

      public static Release current()
      The Pkl release that the current program runs on.
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • version

      public Version version()
      Returns the value of the version record component.
      Returns:
      the value of the version record component
    • os

      public String os()
      Returns the value of the os record component.
      Returns:
      the value of the os record component
    • flavor

      public String flavor()
      Returns the value of the flavor record component.
      Returns:
      the value of the flavor record component
    • versionInfo

      public String versionInfo()
      Returns the value of the versionInfo record component.
      Returns:
      the value of the versionInfo record component
    • commitId

      public String commitId()
      Returns the value of the commitId record component.
      Returns:
      the value of the commitId record component
    • sourceCode

      public Release.SourceCode sourceCode()
      Returns the value of the sourceCode record component.
      Returns:
      the value of the sourceCode record component
    • documentation

      public Release.Documentation documentation()
      Returns the value of the documentation record component.
      Returns:
      the value of the documentation record component
    • standardLibrary

      public Release.StandardLibrary standardLibrary()
      Returns the value of the standardLibrary record component.
      Returns:
      the value of the standardLibrary record component