Class OsInfo


  • final class OsInfo
    extends java.lang.Object
    Provides OS name and architecture name. Used by the JNI make process to get information from the build environment.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.util.HashMap<java.lang.String,​java.lang.String> archMapping  
      (package private) static java.lang.String IA64
      The constant string represents for IA64 architecture, the value is: "ia64".
      (package private) static java.lang.String IA64_32
      The constant string represents for IA64_32 architecture, the value is: "ia64_32".
      (package private) static java.lang.String PPC
      The constant string represents for PPC architecture, the value is: "ppc".
      (package private) static java.lang.String PPC64
      The constant string represents for PPC64 architecture, the value is: "ppc64".
      (package private) static java.lang.String X86
      The constant string represents for X86 architecture, the value is: "x86".
      (package private) static java.lang.String X86_64
      The constant string represents for X86_64 architecture, the value is: "x86_64".
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private OsInfo()
      The private constructor of OsInfo.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static java.lang.String getArchName()
      Gets the architecture name.
      (package private) static java.lang.String getNativeLibFolderPathForCurrentOS()
      Gets the native lib folder.
      (package private) static java.lang.String getOSName()
      Gets the OS name.
      (package private) static java.lang.String getOsNameProperty()  
      static void main​(java.lang.String[] args)
      The main method.
      private static java.lang.String translateArchNameToFolderName​(java.lang.String archName)
      Translates the architecture name to folder name.
      private static java.lang.String translateOSNameToFolderName​(java.lang.String osName)
      Translates the OS name to folder name.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • archMapping

        private static final java.util.HashMap<java.lang.String,​java.lang.String> archMapping
      • X86

        static final java.lang.String X86
        The constant string represents for X86 architecture, the value is: "x86".
        See Also:
        Constant Field Values
      • X86_64

        static final java.lang.String X86_64
        The constant string represents for X86_64 architecture, the value is: "x86_64".
        See Also:
        Constant Field Values
      • IA64_32

        static final java.lang.String IA64_32
        The constant string represents for IA64_32 architecture, the value is: "ia64_32".
        See Also:
        Constant Field Values
      • IA64

        static final java.lang.String IA64
        The constant string represents for IA64 architecture, the value is: "ia64".
        See Also:
        Constant Field Values
      • PPC

        static final java.lang.String PPC
        The constant string represents for PPC architecture, the value is: "ppc".
        See Also:
        Constant Field Values
      • PPC64

        static final java.lang.String PPC64
        The constant string represents for PPC64 architecture, the value is: "ppc64".
        See Also:
        Constant Field Values
    • Constructor Detail

      • OsInfo

        private OsInfo()
        The private constructor of OsInfo.
    • Method Detail

      • getArchName

        static java.lang.String getArchName()
        Gets the architecture name.
        Returns:
        the architecture name.
      • getNativeLibFolderPathForCurrentOS

        static java.lang.String getNativeLibFolderPathForCurrentOS()
        Gets the native lib folder.
        Returns:
        the current OS's native lib folder.
      • getOSName

        static java.lang.String getOSName()
        Gets the OS name.
        Returns:
        the OS name.
      • getOsNameProperty

        static java.lang.String getOsNameProperty()
      • main

        public static void main​(java.lang.String[] args)
        The main method. This is used by the JNI make processing in Makefile.common
        Parameters:
        args - the argv.
      • translateArchNameToFolderName

        private static java.lang.String translateArchNameToFolderName​(java.lang.String archName)
        Translates the architecture name to folder name.
        Parameters:
        archName - the architecture name.
        Returns:
        the folder name.
      • translateOSNameToFolderName

        private static java.lang.String translateOSNameToFolderName​(java.lang.String osName)
        Translates the OS name to folder name.
        Parameters:
        osName - the OS name.
        Returns:
        the folder name.