Package jnr.ffi

Class Library


  • public final class Library
    extends java.lang.Object
    Deprecated.
    Use LibraryLoader instead.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static void addLibraryPath​(java.lang.String libraryName, java.io.File path)
      Deprecated.
      see LibraryLoader for the preferred interface to loading libraries.
      static Library getInstance​(java.lang.String libraryName)
      Deprecated.
      static java.util.List<java.lang.String> getLibraryPath​(java.lang.String libraryName)
      Deprecated.
      see LibraryLoader for the preferred interface to loading libraries.
      java.lang.String getName()
      Deprecated.
      static Runtime getRuntime​(java.lang.Object library)
      static <T> T loadLibrary​(java.lang.Class<T> interfaceClass, java.lang.String... libraryNames)
      Deprecated.
      see LibraryLoader for the preferred interface to loading libraries.
      static <T> T loadLibrary​(java.lang.Class<T> interfaceClass, java.util.Map<LibraryOption,​?> libraryOptions, java.lang.String... libraryNames)
      Deprecated.
      see LibraryLoader for the preferred interface to loading libraries.
      static <T> T loadLibrary​(java.lang.String libraryName, java.lang.Class<T> interfaceClass)
      Deprecated.
      see LibraryLoader for the preferred interface to loading libraries.
      static <T> T loadLibrary​(java.lang.String libraryName, java.lang.Class<T> interfaceClass, java.util.Map<LibraryOption,​?> libraryOptions)
      Deprecated.
      see LibraryLoader for the preferred interface to loading libraries.
      • Methods inherited from class java.lang.Object

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

      • getRuntime

        public static Runtime getRuntime​(java.lang.Object library)
        Gets the Runtime that loaded the library interface.
        Parameters:
        library - A library implementation as returned from LibraryLoader.load()
        Returns:
        The runtime that loaded the library.
      • loadLibrary

        public static <T> T loadLibrary​(java.lang.String libraryName,
                                        java.lang.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​(java.lang.Class<T> interfaceClass,
                                        java.lang.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​(java.lang.String libraryName,
                                        java.lang.Class<T> interfaceClass,
                                        java.util.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​(java.lang.Class<T> interfaceClass,
                                        java.util.Map<LibraryOption,​?> libraryOptions,
                                        java.lang.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​(java.lang.String libraryName,
                                          java.io.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 java.util.List<java.lang.String> getLibraryPath​(java.lang.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.
      • getInstance

        @Deprecated
        public static Library getInstance​(java.lang.String libraryName)
        Deprecated.
      • getName

        @Deprecated
        public java.lang.String getName()
        Deprecated.