Package org.jruby.runtime
Class JavaInternalBlockBody
java.lang.Object
org.jruby.runtime.BlockBody
org.jruby.runtime.JavaInternalBlockBody
Represents a special Java implementation of a block.
-
Field Summary
Fields inherited from class org.jruby.runtime.BlockBody
NULL_BODY, signature, testBlockBody
-
Constructor Summary
ConstructorsConstructorDescriptionJavaInternalBlockBody
(Ruby runtime, Arity arity) Deprecated.JavaInternalBlockBody
(Ruby runtime, Signature signature) For blocks which can be executed in any thread concurrently.JavaInternalBlockBody
(Ruby runtime, ThreadContext originalContext, String methodName, Signature signature) For blocks which cannot be executed in parallel. -
Method Summary
Modifier and TypeMethodDescriptioncall
(ThreadContext context, Block block, IRubyObject[] args) call
(ThreadContext context, Block block, IRubyObject[] args, Block blockArg) protected IRubyObject
doYield
(ThreadContext context, Block block, IRubyObject value) Subclass specific yield implementation.protected IRubyObject
doYield
(ThreadContext context, Block block, IRubyObject[] args, IRubyObject self) Subclass specific yield implementation.getFile()
Get the filename for this blockint
getLine()
get The line number for this blockvoid
setStaticScope
(StaticScope newScope) yield
(ThreadContext context, IRubyObject arg) abstract IRubyObject
yield
(ThreadContext context, IRubyObject[] args) Methods inherited from class org.jruby.runtime.BlockBody
arity, call, call, call, call, call, call, call, call, callDirect, canCallDirect, getArgumentDescriptors, getSignature, getTestBlockBody, isGiven, isRubyBlock, prepareArgumentsForCall, testBlockBody, yield, yield, yield, yield, yieldDirect, yieldSpecific, yieldSpecific, yieldSpecific, yieldSpecific
-
Constructor Details
-
JavaInternalBlockBody
For blocks which can be executed in any thread concurrently. -
JavaInternalBlockBody
public JavaInternalBlockBody(Ruby runtime, ThreadContext originalContext, String methodName, Signature signature) For blocks which cannot be executed in parallel. -
JavaInternalBlockBody
Deprecated.
-
-
Method Details
-
call
-
call
-
doYield
Description copied from class:BlockBody
Subclass specific yield implementation.Should not be called directly. Gets called by
BlockBody.yield(ThreadContext, Block, org.jruby.runtime.builtin.IRubyObject)
after ensuring that any common yield logic is taken care of. -
doYield
protected IRubyObject doYield(ThreadContext context, Block block, IRubyObject[] args, IRubyObject self) Description copied from class:BlockBody
Subclass specific yield implementation.Should not be called directly. Gets called by
BlockBody.yield(ThreadContext, Block, org.jruby.runtime.builtin.IRubyObject[], org.jruby.runtime.builtin.IRubyObject)
after ensuring that all common yield logic is taken care of. -
yield
-
yield
-
getStaticScope
- Specified by:
getStaticScope
in classBlockBody
-
setStaticScope
- Specified by:
setStaticScope
in classBlockBody
-
getFile
Description copied from class:BlockBody
Get the filename for this block -
getLine
public int getLine()Description copied from class:BlockBody
get The line number for this block
-