Package com.avpkit.ferry
Class JNIEnv
- java.lang.Object
-
- com.avpkit.ferry.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.CPUArchgetCPUArch()static com.avpkit.ferry.JNIEnv.CPUArchgetCPUArch(java.lang.String javaCPU)Get the CPU architecture based on the passed in javaCPUArch specifier.static com.avpkit.ferry.JNIEnv.CPUArchgetCPUArchFromGNUString(java.lang.String gnuString)Return a CPUArch from parsing a GNU autoconf triple.static JNIEnvgetEnv()Get the (static)JNIEnvfor this JVM.com.avpkit.ferry.JNIEnv.OSFamilygetOSFamily()static com.avpkit.ferry.JNIEnv.OSFamilygetOSFamily(java.lang.String osName)Get the OSFamily based on the passed in osName specifier.static com.avpkit.ferry.JNIEnv.OSFamilygetOSFamilyFromGNUString(java.lang.String gnuString)Return an OS Family from parsing a GNU autoconf triple.
-
-
-
Method Detail
-
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 fromSystem.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 returnJNIEnv.CPUArch.X86_64and "ppc-apple-darwin" will returnJNIEnv.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 fromSystem.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 returnJNIEnv.OSFamily.WINDOWSand "ppc-apple-darwin" will returnJNIEnv.OSFamily.MAC.- Parameters:
gnuString- the GNU string- Returns:
- the OSFamily
-
getCPUArch
public com.avpkit.ferry.JNIEnv.CPUArch getCPUArch()
- Returns:
- the
JNIEnv.CPUArchof this Java Virtual Machine.
-
getOSFamily
public com.avpkit.ferry.JNIEnv.OSFamily getOSFamily()
- Returns:
- the
JNIEnv.OSFamilyof this Java Virtual Machine.
-
-