Constructor and Description |
---|
Helper() |
Modifier and Type | Method and Description |
---|---|
static Object |
accessGlobalRef(Pointer globalRef)
Returns an Object from the JNI global reference stored in the Pointer.
|
static Pointer |
addressof(String symbol)
Returns the address found under the given name in the "dynamic symbol tables" (Linux, Mac OS X, etc)
or the "export tables" (Windows) of all libraries loaded, or null if not found.
|
static void |
deleteGlobalRef(Pointer globalRef)
Deletes the JNI global reference stored in the Pointer.
|
static Pointer |
getJavaVM()
Returns the JavaVM JNI object, as required by some APIs for initialization.
|
static void |
loadGlobal(String filename)
Loads all symbols from a library globally, that is
dlopen(filename, RTLD_LAZY | RTLD_GLOBAL) ,
or simply by default with LoadLibrary(filename) on Windows. |
static Pointer |
newGlobalRef(Object object)
Returns a JNI global reference stored in a Pointer for the given Object.
|
static int |
totalChips()
Returns the number of CPU chips installed according to the operating system, or 0 if unknown.
|
static int |
totalCores()
Returns the number of CPU cores usable according to the operating system, or 0 if unknown.
|
static int |
totalProcessors()
Returns the number of processors configured according to the operating system, or 0 if unknown.
|
@Name(value="JavaCPP_totalProcessors") public static int totalProcessors()
Runtime.availableProcessors()
and totalCores()
.@Name(value="JavaCPP_totalCores") public static int totalCores()
totalProcessors()
.@Name(value="JavaCPP_totalChips") public static int totalChips()
totalCores()
.@Name(value="JavaCPP_addressof") public static Pointer addressof(String symbol)
@Name(value="JavaCPP_loadGlobal") @Raw(withEnv=true) public static void loadGlobal(String filename)
dlopen(filename, RTLD_LAZY | RTLD_GLOBAL)
,
or simply by default with LoadLibrary(filename)
on Windows. If the library name passed to
one of the other load functions in this class ends with "!", this function will get called on them.@Name(value="JavaCPP_getJavaVM") @Cast(value="JavaVM*") public static Pointer getJavaVM()
@Name(value="JavaCPP_newGlobalRef") @Cast(value="jobject") public static Pointer newGlobalRef(@Raw(withEnv=true) Object object)
@Name(value="JavaCPP_accessGlobalRef") @Raw(withEnv=true) public static Object accessGlobalRef(@Cast(value="jobject") Pointer globalRef)
Copyright © 2024. All rights reserved.