Package jnr.ffi.provider
Class FFIProvider
- java.lang.Object
-
- jnr.ffi.provider.FFIProvider
-
- Direct Known Subclasses:
InvalidProvider,Provider
public abstract class FFIProvider extends java.lang.ObjectThis class defines the facilities a JNR FFI provider must provide. You most likely do NOT want to use this class directly
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classFFIProvider.SystemProviderSingletonHolder
-
Constructor Summary
Constructors Modifier Constructor Description protectedFFIProvider()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract <T> LibraryLoader<T>createLibraryLoader(java.lang.Class<T> interfaceClass)Creates a newLibraryLoaderinstance.abstract RuntimegetRuntime()Gets the defaultRuntimefor this provider.static FFIProvidergetSystemProvider()Gets an instance ofFFIProviderprivate static FFIProvidernewInvalidProvider(java.lang.String message, java.lang.Throwable cause)
-
-
-
Method Detail
-
getSystemProvider
public static FFIProvider getSystemProvider()
Gets an instance ofFFIProvider- Returns:
- an instance of
FFIProvider
-
getRuntime
public abstract Runtime getRuntime()
Gets the defaultRuntimefor this provider.- Returns:
- the runtime.
-
createLibraryLoader
public abstract <T> LibraryLoader<T> createLibraryLoader(java.lang.Class<T> interfaceClass)
Creates a newLibraryLoaderinstance.- Type Parameters:
T- The library type.- Parameters:
interfaceClass- The library interface class.- Returns:
- the
LibraryLoaderinstance.
-
newInvalidProvider
private static FFIProvider newInvalidProvider(java.lang.String message, java.lang.Throwable cause)
-
-