Enum Class Platform

java.lang.Object
java.lang.Enum<Platform>
ghidra.framework.Platform
All Implemented Interfaces:
Serializable, Comparable<Platform>, Constable

public enum Platform extends Enum<Platform>
Identifies the current platform (operating system and architecture) and identifies the appropriate module OS directory which contains native binaries
  • Enum Constant Details

    • WIN_X86_32

      public static final Platform WIN_X86_32
      Identifies a Windows x86 32-bit OS.
    • WIN_X86_64

      public static final Platform WIN_X86_64
      Identifies a Windows x86 64-bit OS.
    • LINUX_X86_32

      public static final Platform LINUX_X86_32
      Identifies a Linux x86 32-bit OS.
    • LINUX_X86_64

      public static final Platform LINUX_X86_64
      Identifies a Linux x86 64-bit OS.
    • LINUX_ARM_64

      public static final Platform LINUX_ARM_64
      Identifies a Linux ARM 64-bit OS.
    • MAC_X86_32

      public static final Platform MAC_X86_32
      Identifies a macOS x86 32-bit OS.
    • MAC_X86_64

      public static final Platform MAC_X86_64
      Identifies a macOS x86 64-bit OS.
    • MAC_ARM_64

      public static final Platform MAC_ARM_64
      Identifies a macOS ARM 64-bit OS.
    • FREEBSD_X86_64

      public static final Platform FREEBSD_X86_64
      Identifies a FreeBSD x86 64-bit OS.
    • FREEBSD_ARM_64

      public static final Platform FREEBSD_ARM_64
      Identifies a FreeBSD ARM 64-bit OS.
    • UNSUPPORTED

      public static final Platform UNSUPPORTED
      Identifies an unsupported OS.
    • WIN_64

      @Deprecated(since="10.1", forRemoval=true) public static final Platform WIN_64
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use WIN_X86_64 instead.
      Identifies a Windows 64-bit OS.
    • WIN_UNKOWN

      @Deprecated(since="10.1", forRemoval=true) public static final Platform WIN_UNKOWN
      Deprecated, for removal: This API element is subject to removal in a future version.
      Unknown architectures are not supported
      Identifies a Windows OS, the architecture for which we do not know or have not encountered. We'll treat it as WIN_X86_64 and hope for the best.
    • LINUX

      @Deprecated(since="10.1", forRemoval=true) public static final Platform LINUX
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use LINUX_X86_32 instead.
      Identifies a Linux X86 32-bit OS.
    • LINUX_64

      @Deprecated(since="10.1", forRemoval=true) public static final Platform LINUX_64
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use LINUX_X86_64 instead.
      Identifies a Linux X86 64-bit OS.
    • LINUX_UKNOWN

      @Deprecated(since="10.1", forRemoval=true) public static final Platform LINUX_UKNOWN
      Deprecated, for removal: This API element is subject to removal in a future version.
      Unknown architectures are not supported
      Identifies a Linux OS, the architecture for which we do not know or have not encountered. We'll treat it as LINUX_X86_64 and hope for the best.
    • MAC_OSX_32

      @Deprecated(since="10.1", forRemoval=true) public static final Platform MAC_OSX_32
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use MAC_OSX_32 instead.
      Identifies a macOS X86 32-bit OS.
    • MAC_OSX_64

      @Deprecated(since="10.1", forRemoval=true) public static final Platform MAC_OSX_64
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use MAC_X86_64 instead.
      Identifies a macOS X86 64-bit OS.
    • MAC_UNKNOWN

      @Deprecated(since="10.1", forRemoval=true) public static final Platform MAC_UNKNOWN
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use MAC_X86_64 instead.
      Identifies a macOS OS, the architecture for which we do not know or have not encountered. We'll treat it as MAC_X86_64 and hope for the best.
  • Field Details

    • CURRENT_PLATFORM

      public static final Platform CURRENT_PLATFORM
      A constant identifying the current platform.
  • Method Details

    • values

      public static Platform[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Platform valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getOperatingSystem

      public OperatingSystem getOperatingSystem()
      Returns the operating system for this platform.
      Returns:
      the operating system for this platform
    • getArchitecture

      public Architecture getArchitecture()
      Returns the architecture for this platform.
      Returns:
      the architecture for this platform
    • getDirectoryName

      public String getDirectoryName()
      Returns the directory name of the current platform.
      Returns:
      the directory name of the current platform
    • getLibraryExtension

      public String getLibraryExtension()
      Returns the library extension for this platform.
      Returns:
      the library extension for this platform
    • getAdditionalLibraryPaths

      public List<String> getAdditionalLibraryPaths()
      Based on the current platform, returns an operating system specific library paths that are not found on the PATH environment variable.
      Returns:
      additional library paths
    • toString

      public String toString()
      Overrides:
      toString in class Enum<Platform>
    • getExecutableExtension

      public String getExecutableExtension()