|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.bridj.Platform
public class Platform
Information about the execution platform (OS, architecture, native sizes...) and platform-specific actions.
is64Bits()
isUnix()
open(File)
, open(URL)
, show(File)
Nested Class Summary | |
---|---|
static class |
Platform.DeleteFiles
|
Field Summary | |
---|---|
static int |
CLONG_SIZE
|
static int |
POINTER_SIZE
|
static int |
SIZE_T_SIZE
|
static int |
TIME_T_SIZE
|
static boolean |
useUnicodeVersionOfWindowsAPIs
Whether to use Unicode versions of Windows APIs rather than ANSI versions (for functions that haven't been bound yet : has no effect on functions that have already been bound). |
static int |
WCHAR_T_SIZE
|
Constructor Summary | |
---|---|
Platform()
|
Method Summary | |
---|---|
static void |
addEmbeddedLibraryResourceRoot(String root)
BridJ is able to automatically extract native binaries bundled in the application's JARs, using a customizable root path and a predefined architecture-dependent subpath. |
static ClassLoader |
getClassLoader()
|
static ClassLoader |
getClassLoader(Class<?> cl)
|
static String |
getMachine()
Machine (as returned by `uname -m`, except for i686 which is actually i386), adjusted to the JVM platform (32 or 64 bits) |
static void |
initLibrary()
|
static boolean |
is64Bits()
|
static boolean |
isAmd64Arch()
|
static boolean |
isAndroid()
|
static boolean |
isArm()
|
static boolean |
isBSD()
|
static boolean |
isLinux()
|
static boolean |
isMacOSX()
|
static boolean |
isSolaris()
|
static boolean |
isSparc()
|
static boolean |
isUnix()
|
static boolean |
isWindows()
|
static boolean |
isWindows7()
|
static void |
open(File file)
Opens a file with the default system action. |
static void |
open(URL url)
Opens an URL with the default system action. |
static void |
show(File file)
Show a file in its parent directory, if possible selecting the file (not possible on all platforms). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int POINTER_SIZE
public static final int WCHAR_T_SIZE
public static final int SIZE_T_SIZE
public static final int TIME_T_SIZE
public static final int CLONG_SIZE
public static boolean useUnicodeVersionOfWindowsAPIs
Constructor Detail |
---|
public Platform()
Method Detail |
---|
public static ClassLoader getClassLoader()
public static ClassLoader getClassLoader(Class<?> cl)
public static void addEmbeddedLibraryResourceRoot(String root)
addEmbeddedLibraryResourceRoot("my/company/lib/")
, BridJ will look for library in the following locations :
public static void initLibrary()
public static boolean isLinux()
public static boolean isMacOSX()
public static boolean isSolaris()
public static boolean isBSD()
public static boolean isUnix()
public static boolean isWindows()
public static boolean isWindows7()
public static String getMachine()
public static boolean isAndroid()
public static boolean isArm()
public static boolean isSparc()
public static boolean is64Bits()
public static boolean isAmd64Arch()
public static final void open(URL url) throws NoSuchMethodException
url
- url to open
NoSuchMethodException
- if opening an URL on the current platform is not supportedpublic static final void open(File file) throws NoSuchMethodException
file
- file to open
NoSuchMethodException
- if opening a file on the current platform is not supportedpublic static final void show(File file) throws NoSuchMethodException, IOException
file
- file to show in the system's default file navigator
NoSuchMethodException
- if showing a file on the current platform is not supported
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |