Class JNIEnv


  • public class JNIEnv
    extends java.lang.Object
    A set of utilities that can be used to find out information about the Native environment that we are running within.
    Author:
    aclarke
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.avpkit.ferry.JNIEnv.CPUArch getCPUArch()  
      static com.avpkit.ferry.JNIEnv.CPUArch getCPUArch​(java.lang.String javaCPU)
      Get the CPU architecture based on the passed in javaCPUArch specifier.
      static com.avpkit.ferry.JNIEnv.CPUArch getCPUArchFromGNUString​(java.lang.String gnuString)
      Return a CPUArch from parsing a GNU autoconf triple.
      static JNIEnv getEnv()
      Get the (static) JNIEnv for this JVM.
      com.avpkit.ferry.JNIEnv.OSFamily getOSFamily()  
      static com.avpkit.ferry.JNIEnv.OSFamily getOSFamily​(java.lang.String osName)
      Get the OSFamily based on the passed in osName specifier.
      static com.avpkit.ferry.JNIEnv.OSFamily getOSFamilyFromGNUString​(java.lang.String gnuString)
      Return an OS Family from parsing a GNU autoconf triple.
      • Methods inherited from class java.lang.Object

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

      • getEnv

        public static JNIEnv getEnv()
        Get the (static) JNIEnv for this JVM.
        Returns:
        the environment
      • getCPUArch

        public static com.avpkit.ferry.JNIEnv.CPUArch getCPUArch​(java.lang.String javaCPU)
        Get the CPU architecture based on the passed in javaCPUArch specifier. The string should be of a format returned from System.getProperty(String) for the property "os.arch".
        Parameters:
        javaCPU - the string to parse
        Returns:
        the CPU architecture
        See Also:
        System.getProperty(String)
      • getCPUArchFromGNUString

        public static com.avpkit.ferry.JNIEnv.CPUArch getCPUArchFromGNUString​(java.lang.String gnuString)
        Return a CPUArch from parsing a GNU autoconf triple. For example "x86_64-w64-mingw32" will return JNIEnv.CPUArch.X86_64 and "ppc-apple-darwin" will return JNIEnv.CPUArch.PPC.
        Parameters:
        gnuString - the GNU string
        Returns:
        the architecture
      • getOSFamily

        public static com.avpkit.ferry.JNIEnv.OSFamily getOSFamily​(java.lang.String osName)
        Get the OSFamily based on the passed in osName specifier. The string should be of a format returned from System.getProperty(String) for the property "os.name".
        Parameters:
        osName - the string to parse
        Returns:
        the OSFamily
        See Also:
        System.getProperty(String)
      • getOSFamilyFromGNUString

        public static com.avpkit.ferry.JNIEnv.OSFamily getOSFamilyFromGNUString​(java.lang.String gnuString)
        Return an OS Family from parsing a GNU autoconf triple. For example "x86_64-w64-mingw32" will return JNIEnv.OSFamily.WINDOWS and "ppc-apple-darwin" will return JNIEnv.OSFamily.MAC.
        Parameters:
        gnuString - the GNU string
        Returns:
        the OSFamily
      • getCPUArch

        public com.avpkit.ferry.JNIEnv.CPUArch getCPUArch()
        Returns:
        the JNIEnv.CPUArch of this Java Virtual Machine.
      • getOSFamily

        public com.avpkit.ferry.JNIEnv.OSFamily getOSFamily()
        Returns:
        the JNIEnv.OSFamily of this Java Virtual Machine.