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.Object
This 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 class
FFIProvider.SystemProviderSingletonHolder
-
Constructor Summary
Constructors Modifier Constructor Description protected
FFIProvider()
-
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 newLibraryLoader
instance.abstract Runtime
getRuntime()
Gets the default Runtime for this provider.static FFIProvider
getSystemProvider()
Gets an instance of FFIProviderprivate static FFIProvider
newInvalidProvider(java.lang.String message, java.lang.Throwable cause)
-
-
-
Method Detail
-
getSystemProvider
public static FFIProvider getSystemProvider()
Gets an instance of FFIProvider- Returns:
- an instance of FFIProvider
-
getRuntime
public abstract Runtime getRuntime()
Gets the default Runtime for this provider.- Returns:
- the runtime.
-
createLibraryLoader
public abstract <T> LibraryLoader<T> createLibraryLoader(java.lang.Class<T> interfaceClass)
Creates a newLibraryLoader
instance.- Type Parameters:
T
- The library type.- Parameters:
interfaceClass
- The library interface class.- Returns:
- the
LibraryLoader
instance.
-
newInvalidProvider
private static FFIProvider newInvalidProvider(java.lang.String message, java.lang.Throwable cause)
-
-