public class ProcMethod extends DynamicMethod implements PositionAware, IRMethodArgs
DynamicMethod.NativeCall
flags, handle, implementationClass, name, protectedClass, serialNumber
Constructor and Description |
---|
ProcMethod(RubyModule implementationClass,
RubyProc proc,
Visibility visibility)
Constructor for ProcMethod.
|
Modifier and Type | Method and Description |
---|---|
IRubyObject |
call(ThreadContext context,
IRubyObject self,
RubyModule klazz,
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.
|
ArgumentDescriptor[] |
getArgumentDescriptors()
Get the array of ArgumentDescriptors that represent the arguments to this method.
|
Arity |
getArity()
Retrieve the arity of this method, used for reporting arity to Ruby
code.
|
String |
getFile()
Get the filename for the method.
|
int |
getLine()
Get the line number for the method.
|
RubyProc |
getProc() |
Signature |
getSignature()
Get the Signature for this method.
|
boolean |
isSame(DynamicMethod method) |
calculateProtectedClass, call, call, call, call, call, call, call, call, call, getCallConfig, getHandle, getImplementationClass, getMethodData, getName, getProtectedClass, getRealMethod, getSerialNumber, getVisibility, init, init, isBuiltin, isCallableFrom, isImplementedBy, isNative, isNotImplemented, isNull, isUndefined, setCallConfig, setHandle, setImplementationClass, setIsBuiltin, setName, setNotImplemented, setVisibility
public ProcMethod(RubyModule implementationClass, RubyProc proc, Visibility visibility)
visibility
- public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, 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 callklazz
- 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 DynamicMethod dup()
DynamicMethod
dup
in class DynamicMethod
public boolean isSame(DynamicMethod method)
public Arity getArity()
DynamicMethod
getArity
in class DynamicMethod
public String getFile()
PositionAware
getFile
in interface PositionAware
public int getLine()
PositionAware
getLine
in interface PositionAware
public Signature getSignature()
IRMethodArgs
getSignature
in interface IRMethodArgs
public ArgumentDescriptor[] getArgumentDescriptors()
IRMethodArgs
getArgumentDescriptors
in interface IRMethodArgs
public RubyProc getProc()
Copyright © 2001-2016 JRuby. All Rights Reserved.