Enum Platform

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Platform>

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

      Enum Constants 
      Enum Constant Description
      LINUX
      Identifies a Linux OS.
      LINUX_64
      Identifies a Linux OS.
      LINUX_UKNOWN
      Identifies a Linux OS, the architecture for which we do not know or have not encountered
      MAC_OSX_32
      Identifies a Mac OS X for the Intel x86 32-bit platform.
      MAC_OSX_64
      Identifies a Mac OS X for the Intel x86 64-bit platform.
      MAC_UNKNOWN
      Identifies a Mac OS, the architecture for which we do not know or have not encountered
      UNSUPPORTED
      Identifies an unsupported OS.
      WIN_32
      Identifies a Windows 32-bit OS (e.g., Windows NT, 2000, XP, etc.).
      WIN_64
      Identifies a Windows 64-bit OS (e.g., XP-64, etc.).
      WIN_UNKOWN
      Identifies a Windows OS, the architecture for which we do not know or have not encountered
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static Platform CURRENT_PLATFORM
      A constant identifying the current platform.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<java.lang.String> getAdditionalLibraryPaths()
      Based on the current platform, returns an operating system specific library paths that are not found on the PATH environment variable.
      Architecture getArchitecture()
      Returns the architecture for this platform.
      java.lang.String getDirectoryName()
      Returns the directory name of the current platform.
      java.lang.String getExecutableExtension()  
      java.lang.String getLibraryExtension()
      Returns the library extension for this platform.
      OperatingSystem getOperatingSystem()
      Returns the operating system for this platform.
      java.lang.String toString()  
      static Platform valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static Platform[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • WIN_32

        public static final Platform WIN_32
        Identifies a Windows 32-bit OS (e.g., Windows NT, 2000, XP, etc.).
      • WIN_64

        public static final Platform WIN_64
        Identifies a Windows 64-bit OS (e.g., XP-64, etc.).
      • WIN_UNKOWN

        public static final Platform WIN_UNKOWN
        Identifies a Windows OS, the architecture for which we do not know or have not encountered
      • LINUX

        public static final Platform LINUX
        Identifies a Linux OS.
      • LINUX_64

        public static final Platform LINUX_64
        Identifies a Linux OS.
      • LINUX_UKNOWN

        public static final Platform LINUX_UKNOWN
        Identifies a Linux OS, the architecture for which we do not know or have not encountered
      • MAC_OSX_32

        public static final Platform MAC_OSX_32
        Identifies a Mac OS X for the Intel x86 32-bit platform.
      • MAC_OSX_64

        public static final Platform MAC_OSX_64
        Identifies a Mac OS X for the Intel x86 64-bit platform.
      • MAC_UNKNOWN

        public static final Platform MAC_UNKNOWN
        Identifies a Mac OS, the architecture for which we do not know or have not encountered
      • UNSUPPORTED

        public static final Platform UNSUPPORTED
        Identifies an unsupported OS.
    • Field Detail

      • CURRENT_PLATFORM

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

      • values

        public static Platform[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Platform c : Platform.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Platform valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.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 java.lang.String getDirectoryName()
        Returns the directory name of the current platform.
        Returns:
        the directory name of the current platform
      • getLibraryExtension

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

        public java.util.List<java.lang.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 java.lang.String toString()
        Overrides:
        toString in class java.lang.Enum<Platform>
      • getExecutableExtension

        public java.lang.String getExecutableExtension()