public class HandleMethod extends DynamicMethod implements MethodArgs2, java.lang.Cloneable
DynamicMethod.NativeCall, DynamicMethod.Version
definedClass, flags, handle, implementationClass, name, protectedClass, serialNumber
Constructor and Description |
---|
HandleMethod(RubyModule implementationClass,
Visibility visibility,
java.lang.String name,
long encodedSignature,
boolean builtin,
boolean notImplemented,
java.lang.String parameterDesc,
int min,
int max,
java.util.concurrent.Callable<java.lang.invoke.MethodHandle> maker0,
java.util.concurrent.Callable<java.lang.invoke.MethodHandle> maker1,
java.util.concurrent.Callable<java.lang.invoke.MethodHandle> maker2,
java.util.concurrent.Callable<java.lang.invoke.MethodHandle> maker3,
java.util.concurrent.Callable<java.lang.invoke.MethodHandle> maker4) |
Modifier and Type | Method and Description |
---|---|
IRubyObject |
call(ThreadContext context,
IRubyObject self,
RubyModule clazz,
java.lang.String name,
Block block)
Arity 0, with block; calls through IRubyObject[] path
|
IRubyObject |
call(ThreadContext context,
IRubyObject self,
RubyModule clazz,
java.lang.String name,
IRubyObject[] args,
Block block)
The minimum 'call' method required for a dynamic method handle.
|
IRubyObject |
call(ThreadContext context,
IRubyObject self,
RubyModule clazz,
java.lang.String name,
IRubyObject arg0,
Block block)
Arity 1, with block; calls through IRubyObject[] path
|
IRubyObject |
call(ThreadContext context,
IRubyObject self,
RubyModule clazz,
java.lang.String name,
IRubyObject arg0,
IRubyObject arg1,
Block block)
Arity 2, with block; calls through IRubyObject[] path
|
IRubyObject |
call(ThreadContext context,
IRubyObject self,
RubyModule clazz,
java.lang.String name,
IRubyObject arg0,
IRubyObject arg1,
IRubyObject arg2,
Block block)
Arity 3, with block; calls through IRubyObject[] path
|
DynamicMethod |
dup()
Duplicate this method, returning DynamicMethod referencing the same code
and with the same attributes.
|
Arity |
getArity()
Retrieve the arity of this method, used for reporting arity to Ruby
code.
|
java.lang.invoke.MethodHandle |
getHandle(int arity) |
java.lang.String[] |
getParameterList() |
boolean |
isBuiltin() |
boolean |
isNative()
Returns true if this method is backed by native (i.e.
|
boolean |
isNotImplemented()
Whether this method is "not implemented".
|
calculateProtectedClass, call, call, call, call, call, getCallConfig, getDefinedClass, getHandle, getImplementationClass, getMethodData, getName, getProtectedClass, getRealMethod, getSerialNumber, getVisibility, init, init, isCallableFrom, isImplementedBy, isNull, isUndefined, setCallConfig, setDefinedClass, setHandle, setImplementationClass, setIsBuiltin, setNotImplemented, setVisibility
public HandleMethod(RubyModule implementationClass, Visibility visibility, java.lang.String name, long encodedSignature, boolean builtin, boolean notImplemented, java.lang.String parameterDesc, int min, int max, java.util.concurrent.Callable<java.lang.invoke.MethodHandle> maker0, java.util.concurrent.Callable<java.lang.invoke.MethodHandle> maker1, java.util.concurrent.Callable<java.lang.invoke.MethodHandle> maker2, java.util.concurrent.Callable<java.lang.invoke.MethodHandle> maker3, java.util.concurrent.Callable<java.lang.invoke.MethodHandle> maker4)
public Arity getArity()
DynamicMethod
getArity
in class DynamicMethod
public boolean isBuiltin()
isBuiltin
in class DynamicMethod
public boolean isNotImplemented()
DynamicMethod
isNotImplemented
in class DynamicMethod
public boolean isNative()
DynamicMethod
isNative
in class DynamicMethod
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, java.lang.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 IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, java.lang.String name, Block block)
DynamicMethod
call
in class DynamicMethod
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, java.lang.String name, IRubyObject arg0, Block block)
DynamicMethod
call
in class DynamicMethod
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, java.lang.String name, IRubyObject arg0, IRubyObject arg1, Block block)
DynamicMethod
call
in class DynamicMethod
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, java.lang.String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block)
DynamicMethod
call
in class DynamicMethod
public DynamicMethod dup()
DynamicMethod
dup
in class DynamicMethod
public java.lang.String[] getParameterList()
getParameterList
in interface MethodArgs2
public java.lang.invoke.MethodHandle getHandle(int arity)
Copyright © 2001-2018 JRuby. All Rights Reserved.