Top Description Fields Constructors Methods
org.jruby.ext.ffi.jffi

pack-priv final Class BufferNativeInvoker

extends NativeInvoker
Class Inheritance
Imports
com.kenai.jffi.HeapInvocationBuffer, org.jruby.RubyModule, org.jruby.runtime.Arity, .ThreadContext, org.jruby.runtime.builtin.IRubyObject

Invokes a native function using InvocationBuffer methods.

Field Summary

Modifier and TypeField and Description
private final HeapInvocationBuffer
private final Function
private final FunctionInvoker
private final boolean
private final ParameterMarshaller[]
private final int
private final int
Inherited from org.jruby.ext.ffi.jffi.NativeInvoker:
arity

Constructor Summary

AccessConstructor and Description
pack-priv
BufferNativeInvoker(RubyModule implementationClass, Function function, Signature signature, FunctionInvoker functionInvoker, ParameterMarshaller[] parameterMarshallers)

Method Summary

Modifier and TypeMethod and Description
public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject
call(ThreadContext
The thread context for the currently executing thread
context
,
IRubyObject
The 'self' or 'receiver' object to use for this call
self
,
RubyModule
The Ruby class against which this method is binding
klazz
,
String
The incoming name used to invoke this method
name
,
IRubyObject[]
The first argument to this invocation
args
)

Overrides org.jruby.internal.runtime.methods.DynamicMethod.call.

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.

Inherited from org.jruby.ext.ffi.jffi.NativeInvoker:
calldupgetAritygetCallContextgetFunctionAddressisNative

Field Detail

dummyBufferback to summary
private final HeapInvocationBuffer dummyBuffer
functionback to summary
private final Function function

Hides org.jruby.ext.ffi.jffi.NativeInvoker.function.

functionInvokerback to summary
private final FunctionInvoker functionInvoker
needsInvocationSessionback to summary
private final boolean needsInvocationSession
parameterMarshallersback to summary
private final ParameterMarshaller[] parameterMarshallers
postInvokeCountback to summary
private final int postInvokeCount
referenceCountback to summary
private final int referenceCount

Constructor Detail

BufferNativeInvokerback to summary
pack-priv BufferNativeInvoker(RubyModule implementationClass, Function function, Signature signature, FunctionInvoker functionInvoker, ParameterMarshaller[] parameterMarshallers)

Method Detail

callback to summary
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, String name)

Overrides org.jruby.internal.runtime.methods.DynamicMethod.call.

callback to summary
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg1)

Overrides org.jruby.internal.runtime.methods.DynamicMethod.call.

callback to summary
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg1, IRubyObject arg2)

Overrides org.jruby.internal.runtime.methods.DynamicMethod.call.

callback to summary
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3)

Overrides org.jruby.internal.runtime.methods.DynamicMethod.call.

callback to summary
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject[] args)

Overrides org.jruby.internal.runtime.methods.DynamicMethod.call.

Doc from org.jruby.internal.runtime.methods.DynamicMethod.call.

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.

Parameters
context:ThreadContext

The thread context for the currently executing thread

self:IRubyObject

The 'self' or 'receiver' object to use for this call

klazz:RubyModule

The Ruby class against which this method is binding

name:String

The incoming name used to invoke this method

args:IRubyObject[]

The first argument to this invocation

Returns:IRubyObject

The result of the call