public class DefaultMethod extends DynamicMethod implements CacheableMethod
DynamicMethod.NativeCall
Modifier and Type | Field and Description |
---|---|
protected Arity |
arity |
static boolean |
DEBUG |
protected com.kenai.jffi.Function |
function |
static boolean |
REIFY |
protected org.jruby.ext.ffi.jffi.Signature |
signature |
builtin, callConfig, handle, implementationClass, name, nativeCall, nativeCalls, notImplemented, protectedClass, serialNumber, visibility
Constructor and Description |
---|
DefaultMethod(RubyModule implementationClass,
com.kenai.jffi.Function function,
org.jruby.ext.ffi.jffi.Signature signature,
NativeInvoker defaultInvoker) |
Modifier and Type | Method and Description |
---|---|
IRubyObject |
call(ThreadContext context,
IRubyObject self,
RubyModule clazz,
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.
|
IRubyObject |
call(ThreadContext context,
IRubyObject self,
RubyModule clazz,
String name,
IRubyObject[] args,
Block block)
The minimum 'call' method required for a dynamic method handle.
|
DynamicMethod |
dup()
Duplicate this method, returning DynamicMethod referencing the same code
and with the same attributes.
|
NativeInvoker |
forceCompilation() |
Arity |
getArity()
Retrieve the arity of this method, used for reporting arity to Ruby
code.
|
DynamicMethod |
getMethodForCaching() |
protected NativeInvoker |
getNativeInvoker() |
boolean |
isNative()
Returns true if this method is backed by native (i.e.
|
calculateProtectedClass, call, call, call, call, call, call, call, call, getCallConfig, getHandle, getImplementationClass, getMethodData, getName, getNativeCall, getNativeCall, getProtectedClass, getRealMethod, getSerialNumber, getVisibility, init, isBuiltin, isCallableFrom, isImplementedBy, isNotImplemented, isNull, isUndefined, setCallConfig, setHandle, setImplementationClass, setIsBuiltin, setName, setNativeCall, setNativeCall, setNativeCall, setNotImplemented, setVisibility
public static final boolean DEBUG
public static final boolean REIFY
protected final org.jruby.ext.ffi.jffi.Signature signature
protected final Arity arity
protected final com.kenai.jffi.Function function
public DefaultMethod(RubyModule implementationClass, com.kenai.jffi.Function function, org.jruby.ext.ffi.jffi.Signature signature, NativeInvoker defaultInvoker)
public final DynamicMethod dup()
DynamicMethod
dup
in class DynamicMethod
public final Arity getArity()
DynamicMethod
getArity
in class DynamicMethod
public final boolean isNative()
DynamicMethod
isNative
in class DynamicMethod
public DynamicMethod getMethodForCaching()
getMethodForCaching
in interface CacheableMethod
protected final NativeInvoker getNativeInvoker()
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args)
DynamicMethod
call
in class DynamicMethod
context
- The thread context for the currently executing threadself
- The 'self' or 'receiver' object to use for this callclazz
- The Ruby class against which this method is bindingname
- The incoming name used to invoke this methodargs
- The first argument to this invocationpublic IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args, Block block)
DynamicMethod
call
in class DynamicMethod
context
- The thread context for the currently executing threadself
- The 'self' or 'receiver' object to use for this callclazz
- The Ruby class against which this method is bindingname
- The incoming name used to invoke this methodargs
- The argument list to this invocationblock
- The block passed to this invocationpublic final NativeInvoker forceCompilation()
Copyright © 2001-2015 JRuby. All Rights Reserved.