Record Class Platform

java.lang.Object
java.lang.Record
de.infolektuell.gradle.jextract.model.Platform
Record Components:
operatingSystem - Indicates the platform's operating system
architecture - Indicates the platform's processor architecture

public record Platform(Platform.OperatingSystem operatingSystem, Platform.Architecture architecture) extends Record
Describes a platform where jextract can be installed and run.
  • Constructor Details

  • Method Details

    • isLinux

      public boolean isLinux()
      Checks if the platform's OS is Linux.
      Returns:
      True if the platform's OS is Linux.
    • isMac

      public boolean isMac()
      Checks if the platform's OS is macOS.
      Returns:
      True if the platform's OS is macOS.
    • isWindows

      public boolean isWindows()
      Checks if the platform's OS is MS Windows.
      Returns:
      True if the platform's OS is MS Windows.
    • isArch64

      public boolean isArch64()
      Checks if the platform's architecture is AArch64.
      Returns:
      True if the platform's architecture is AArch64.
    • isX64

      public boolean isX64()
      Checks if the platform's architecture is X64.
      Returns:
      True if the platform's architecture is X64.
    • getCurrentPlatform

      public static Platform getCurrentPlatform()
      Tries to infer the current running platform.
      Returns:
      The inferred platform, Linux on X64 by default.
    • 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.
    • operatingSystem

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

      public Platform.Architecture architecture()
      Returns the value of the architecture record component.
      Returns:
      the value of the architecture record component