Package org.jruby.ext.ffi.jffi
Class BufferNativeInvoker
java.lang.Object
org.jruby.internal.runtime.methods.DynamicMethod
org.jruby.ext.ffi.jffi.NativeInvoker
org.jruby.ext.ffi.jffi.BufferNativeInvoker
Invokes a native function using InvocationBuffer methods.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jruby.internal.runtime.methods.DynamicMethod
DynamicMethod.NativeCall, DynamicMethod.Version -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.kenai.jffi.HeapInvocationBufferprivate final com.kenai.jffi.Functionprivate final FunctionInvokerprivate final booleanprivate final ParameterMarshaller[]private final intprivate final intFields inherited from class org.jruby.ext.ffi.jffi.NativeInvoker
arityFields inherited from class org.jruby.internal.runtime.methods.DynamicMethod
definedClass, flags, handle, implementationClass, name, protectedClass, serialNumber -
Constructor Summary
ConstructorsConstructorDescriptionBufferNativeInvoker(RubyModule implementationClass, com.kenai.jffi.Function function, Signature signature, FunctionInvoker functionInvoker, ParameterMarshaller[] parameterMarshallers) -
Method Summary
Modifier and TypeMethodDescriptioncall(ThreadContext context, IRubyObject self, RubyModule klazz, String name) Arity 0, no blockcall(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg1) Arity 1, no blockcall(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject[] args) A default implementation of n-arity, non-block 'call' method, which simply calls the n-arity, block-receiving version with the arg list and Block.NULL_BLOCK.call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg1, IRubyObject arg2) Arity 2, no blockcall(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3) Arity 3, no blockMethods inherited from class org.jruby.ext.ffi.jffi.NativeInvoker
call, dup, getArity, getCallContext, getFunctionAddress, isNativeMethods inherited from class org.jruby.internal.runtime.methods.DynamicMethod
calculateProtectedClass, call, call, call, call, callRespondTo, getCallConfig, getDefinedClass, getHandle, getImplementationClass, getInstanceVariableNames, getMethodData, getName, getProtectedClass, getRealMethod, getSerialNumber, getSignature, getVisibility, init, init, isBuiltin, isCallableFrom, isImplementedBy, isNotImplemented, isNull, isRefined, isUndefined, setCallConfig, setDefinedClass, setHandle, setImplementationClass, setIsBuiltin, setNotImplemented, setVisibility
-
Field Details
-
function
private final com.kenai.jffi.Function function -
functionInvoker
-
parameterMarshallers
-
needsInvocationSession
private final boolean needsInvocationSession -
postInvokeCount
private final int postInvokeCount -
referenceCount
private final int referenceCount -
dummyBuffer
private final com.kenai.jffi.HeapInvocationBuffer dummyBuffer
-
-
Constructor Details
-
BufferNativeInvoker
BufferNativeInvoker(RubyModule implementationClass, com.kenai.jffi.Function function, Signature signature, FunctionInvoker functionInvoker, ParameterMarshaller[] parameterMarshallers)
-
-
Method Details
-
call
Description copied from class:DynamicMethodArity 0, no block- Overrides:
callin classDynamicMethod
-
call
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg1) Description copied from class:DynamicMethodArity 1, no block- Overrides:
callin classDynamicMethod
-
call
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg1, IRubyObject arg2) Description copied from class:DynamicMethodArity 2, no block- Overrides:
callin classDynamicMethod
-
call
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3) Description copied from class:DynamicMethodArity 3, no block- Overrides:
callin classDynamicMethod
-
call
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject[] args) Description copied from class:DynamicMethodA default implementation of n-arity, non-block 'call' method, which simply calls the n-arity, block-receiving version with the arg list and Block.NULL_BLOCK.- Overrides:
callin classDynamicMethod- Parameters:
context- The thread context for the currently executing threadself- The 'self' or 'receiver' object to use for this callklazz- The Ruby class against which this method is bindingname- The incoming name used to invoke this methodargs- The first argument to this invocation- Returns:
- The result of the call
-