Class Loader.Helper

  • Enclosing class:
    Loader

    public static class Loader.Helper
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Helper()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.Object accessGlobalRef​(Pointer globalRef)
      Returns an Object from the JNI global reference stored in the Pointer.
      static Pointer addressof​(java.lang.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​(java.lang.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​(java.lang.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.
      • Methods inherited from class java.lang.Object

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

      • Helper

        public Helper()
    • Method Detail

      • totalProcessors

        @Name("JavaCPP_totalProcessors")
        public static int totalProcessors()
        Returns the number of processors configured according to the operating system, or 0 if unknown. This value can be greater than Runtime.availableProcessors() and totalCores().
      • totalCores

        @Name("JavaCPP_totalCores")
        public static int totalCores()
        Returns the number of CPU cores usable according to the operating system, or 0 if unknown. For SMT-capable systems, this value may be less than totalProcessors().
      • totalChips

        @Name("JavaCPP_totalChips")
        public static int totalChips()
        Returns the number of CPU chips installed according to the operating system, or 0 if unknown. For multi-core processors, this value may be less than totalCores().
      • addressof

        @Name("JavaCPP_addressof")
        public static Pointer addressof​(java.lang.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.
      • loadGlobal

        @Name("JavaCPP_loadGlobal")
        @Raw(withEnv=true)
        public static void loadGlobal​(java.lang.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. If the library name passed to one of the other load functions in this class ends with "!", this function will get called on them.
      • getJavaVM

        @Name("JavaCPP_getJavaVM")
        @Cast("JavaVM*")
        public static Pointer getJavaVM()
        Returns the JavaVM JNI object, as required by some APIs for initialization.
      • newGlobalRef

        @Name("JavaCPP_newGlobalRef")
        @Cast("jobject")
        public static Pointer newGlobalRef​(@Raw(withEnv=true)
                                           java.lang.Object object)
        Returns a JNI global reference stored in a Pointer for the given Object.
      • accessGlobalRef

        @Name("JavaCPP_accessGlobalRef")
        @Raw(withEnv=true)
        public static java.lang.Object accessGlobalRef​(@Cast("jobject")
                                                       Pointer globalRef)
        Returns an Object from the JNI global reference stored in the Pointer.
      • deleteGlobalRef

        @Name("JavaCPP_deleteGlobalRef")
        @Raw(withEnv=true)
        public static void deleteGlobalRef​(@Cast("jobject")
                                           Pointer globalRef)
        Deletes the JNI global reference stored in the Pointer.