Package com.ibm.wala.util
Class PlatformUtil
- java.lang.Object
-
- com.ibm.wala.util.PlatformUtil
-
public class PlatformUtil extends Object
Platform-specific utility functions.
-
-
Constructor Summary
Constructors Constructor Description PlatformUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intgetJavaRuntimeVersion()static String[]getJDKModules(boolean justBase)Gets the standard JDK modules shipped with the running JDKstatic PathgetPathForJDKModule(String moduleName)Returns the filesystem path for a JDK module from the running JVMstatic booleanonIKVM()are we running on IKVM?static booleanonLinux()are we running on Linux?static booleanonMacOSX()are we running on Mac OS X?static booleanonWindows()are we running on Windows?
-
-
-
Method Detail
-
onMacOSX
public static boolean onMacOSX()
are we running on Mac OS X?
-
onLinux
public static boolean onLinux()
are we running on Linux?
-
onWindows
public static boolean onWindows()
are we running on Windows?
-
onIKVM
public static boolean onIKVM()
are we running on IKVM?
-
getJDKModules
public static String[] getJDKModules(boolean justBase)
Gets the standard JDK modules shipped with the running JDK- Parameters:
justBase- iftrue, only include the file corresponding to thejava.basemodule- Returns:
- array of
.jmodmodule files - Throws:
IllegalStateException- if modules cannot be found
-
getPathForJDKModule
public static Path getPathForJDKModule(String moduleName)
Returns the filesystem path for a JDK module from the running JVM- Parameters:
moduleName- name of the module, e.g.,"java.sql"- Returns:
- path to the module
-
getJavaRuntimeVersion
public static int getJavaRuntimeVersion()
- Returns:
- the major version of the Java runtime we are running on.
-
-