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 platformruntime- the language runtime of this platformvirtualMachine- the virtual machine of this platformoperatingSystem- the operating system of this platformprocessor- 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.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordThe language implementation of a platform.static final recordThe operating system of a platform.static final recordThe processor of a platform.static final recordThe language runtime of a platform.static final recordThe virtual machine of a platform. -
Constructor Summary
ConstructorsConstructorDescriptionPlatform(Platform.Language language, Platform.Runtime runtime, Platform.VirtualMachine virtualMachine, Platform.OperatingSystem operatingSystem, Platform.Processor processor) Creates an instance of aPlatformrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic Platformcurrent()The Pkl release that the current program runs on.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.language()Returns the value of thelanguagerecord component.Returns the value of theoperatingSystemrecord component.Returns the value of theprocessorrecord component.runtime()Returns the value of theruntimerecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thevirtualMachinerecord component.
-
Constructor Details
-
Platform
public Platform(Platform.Language language, Platform.Runtime runtime, Platform.VirtualMachine virtualMachine, Platform.OperatingSystem operatingSystem, Platform.Processor processor) Creates an instance of aPlatformrecord class.- Parameters:
language- the value for thelanguagerecord componentruntime- the value for theruntimerecord componentvirtualMachine- the value for thevirtualMachinerecord componentoperatingSystem- the value for theoperatingSystemrecord componentprocessor- the value for theprocessorrecord 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). -
language
Returns the value of thelanguagerecord component.- Returns:
- the value of the
languagerecord component
-
runtime
Returns the value of theruntimerecord component.- Returns:
- the value of the
runtimerecord component
-
virtualMachine
Returns the value of thevirtualMachinerecord component.- Returns:
- the value of the
virtualMachinerecord component
-
operatingSystem
Returns the value of theoperatingSystemrecord component.- Returns:
- the value of the
operatingSystemrecord component
-
processor
Returns the value of theprocessorrecord component.- Returns:
- the value of the
processorrecord component
-