Package jnr.ffi

Class Library

    • Method Detail

      • loadLibrary

        public static <T> T loadLibrary​(String libraryName,
                                        Class<T> interfaceClass)
        Deprecated.
        see LibraryLoader for the preferred interface to loading libraries.
        Loads a native library and links the methods defined in interfaceClass to native methods in the library.
        Type Parameters:
        T - the interface class.
        Parameters:
        libraryName - the name of the library to load
        interfaceClass - the interface that describes the native library interface
        Returns:
        an instance of interfaceclass that will call the native methods.
      • loadLibrary

        public static <T> T loadLibrary​(Class<T> interfaceClass,
                                        String... libraryNames)
        Deprecated.
        see LibraryLoader for the preferred interface to loading libraries.
        Loads a native library and links the methods defined in interfaceClass to native methods in the library.
        Type Parameters:
        T - the interface type.
        Parameters:
        libraryNames - the name of the library to load
        interfaceClass - the interface that describes the native library interface
        Returns:
        an instance of interfaceclass that will call the native methods.
      • loadLibrary

        public static <T> T loadLibrary​(String libraryName,
                                        Class<T> interfaceClass,
                                        Map<LibraryOption,​?> libraryOptions)
        Deprecated.
        see LibraryLoader for the preferred interface to loading libraries.
        Loads a native library and links the methods defined in interfaceClass to native methods in the library.
        Type Parameters:
        T - the interface type.
        Parameters:
        libraryName - the name of the library to load
        interfaceClass - the interface that describes the native library interface
        libraryOptions - options
        Returns:
        an instance of interfaceclass that will call the native methods.
      • loadLibrary

        public static <T> T loadLibrary​(Class<T> interfaceClass,
                                        Map<LibraryOption,​?> libraryOptions,
                                        String... libraryNames)
        Deprecated.
        see LibraryLoader for the preferred interface to loading libraries.
        Loads a native library and links the methods defined in interfaceClass to native methods in the library.
        Type Parameters:
        T - the interface type.
        Parameters:
        libraryNames - the name of the library to load
        interfaceClass - the interface that describes the native library interface
        libraryOptions - options
        Returns:
        an instance of interfaceclass that will call the native methods.
      • addLibraryPath

        public static void addLibraryPath​(String libraryName,
                                          File path)
        Deprecated.
        see LibraryLoader for the preferred interface to loading libraries.
        Adds a custom search path for a library
        Parameters:
        libraryName - the name of the library to search for
        path - the path to search for the library in
      • getLibraryPath

        public static List<String> getLibraryPath​(String libraryName)
        Deprecated.
        see LibraryLoader for the preferred interface to loading libraries.
        Gets the custom search path for a library.
        Parameters:
        libraryName - The library to retrieve the path for.
        Returns:
        A List of String instances.