org.jruby.ext.ffi.jna
Class JNAFactory
java.lang.Object
org.jruby.ext.ffi.Factory
org.jruby.ext.ffi.jna.JNAFactory
public class JNAFactory
- extends Factory
An implementation of FFI for JNA
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JNAFactory
public JNAFactory()
init
public void init(Ruby runtime,
RubyModule ffi)
- Description copied from class:
Factory
- Registers FFI ruby classes/modules
- Overrides:
init
in class Factory
newProvider
protected FFIProvider newProvider(Ruby runtime)
- Specified by:
newProvider
in class Factory
loadLibrary
public <T> T loadLibrary(java.lang.String libraryName,
java.lang.Class<T> libraryClass)
- Description copied from class:
Factory
- Loads a native library.
- Specified by:
loadLibrary
in class Factory
- Parameters:
libraryName
- The name of the library to load.libraryClass
- The interface class to map to the library functions.
- Returns:
- A new instance of libraryClass that an access the library.
getPlatform
public Platform getPlatform()
- Description copied from class:
Factory
- Gets the platform info for this FFIProvider.
- Specified by:
getPlatform
in class Factory
- Returns:
- A platform information instance.
newByteChannel
public java.nio.channels.ByteChannel newByteChannel(int fd)
- Description copied from class:
Factory
- Wraps a
java.nio.ByteChannel
around a native file descriptor
- Specified by:
newByteChannel
in class Factory
Copyright © 2002-2007 JRuby Team. All Rights Reserved.