Package org.pkl.core

Record Class Platform

java.lang.Object
java.lang.Record
org.pkl.core.Platform
Record Components:
language - the language implementation of this platform
runtime - the language runtime of this platform
virtualMachine - the virtual machine of this platform
operatingSystem - the operating system of this platform
processor - the processor of this platform

public record Platform(Platform.Language language, Platform.Runtime runtime, Platform.VirtualMachine virtualMachine, Platform.OperatingSystem operatingSystem, Platform.Processor processor) extends Record
Information about the Pkl release that the current program runs on. This class is the Java equivalent of standard library module pkl.platform.
  • Constructor Details

  • Method Details

    • current

      public static Platform 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.
    • language

      public Platform.Language language()
      Returns the value of the language record component.
      Returns:
      the value of the language record component
    • runtime

      public Platform.Runtime runtime()
      Returns the value of the runtime record component.
      Returns:
      the value of the runtime record component
    • virtualMachine

      public Platform.VirtualMachine virtualMachine()
      Returns the value of the virtualMachine record component.
      Returns:
      the value of the virtualMachine record component
    • operatingSystem

      public Platform.OperatingSystem operatingSystem()
      Returns the value of the operatingSystem record component.
      Returns:
      the value of the operatingSystem record component
    • processor

      public Platform.Processor processor()
      Returns the value of the processor record component.
      Returns:
      the value of the processor record component