Top Description Fields Constructors Methods
org.jruby.runtime

public Class CallBlock

extends BlockBody
Class Inheritance
Imports
org.jruby.RubyModule, org.jruby.parser.StaticScope, org.jruby.runtime.builtin.IRubyObject, org.jruby.util.ArraySupport

A Block implemented using a Java-based BlockCallback implementation. For lightweight block logic within Java code.

Field Summary

Modifier and TypeField and Description
private final BlockCallback
private final StaticScope
Inherited from org.jruby.runtime.BlockBody:
NULL_BODYsignaturetestBlockBody

Constructor Summary

AccessConstructor and Description
private
CallBlock(ThreadContext context, Signature signature, BlockCallback callback)

Method Summary

Modifier and TypeMethod and Description
pack-priv static IRubyObject[]
adjustArgs(Block block, IRubyObject[] args)

public IRubyObject
public IRubyObject
call(ThreadContext context, Block block, IRubyObject[] args, Block blockArg)

Overrides org.jruby.runtime.BlockBody.call.

protected IRubyObject
doYield(ThreadContext context, Block block, IRubyObject value)

Implements abstract org.jruby.runtime.BlockBody.doYield.

Subclass specific yield implementation.

protected IRubyObject
doYield(ThreadContext context, Block block, IRubyObject[] args, IRubyObject self)

Implements abstract org.jruby.runtime.BlockBody.doYield.

Subclass specific yield implementation.

public String
getFile()

Implements abstract org.jruby.runtime.BlockBody.getFile.

Get the filename for this block

public int
getLine()

Implements abstract org.jruby.runtime.BlockBody.getLine.

get The line number for this block

public StaticScope
public static Block
newCallClosure(IRubyObject self, RubyModule imClass, Signature signature, BlockCallback callback, ThreadContext context)

public static Block
newCallClosure(ThreadContext context, IRubyObject self, Signature signature, BlockCallback callback)

public static Block
newCallClosure(IRubyObject self, RubyModule imClass, Arity arity, BlockCallback callback, ThreadContext context)
Deprecated

public void
public IRubyObject
public IRubyObject
Inherited from org.jruby.runtime.BlockBody:
aritycallcallcallcallcallcallcallcallcallDirectcanCallDirectgetArgumentDescriptorsgetSignaturegetTestBlockBodyisGivenisRubyBlockprepareArgumentsForCalltestBlockBodyyieldyieldyieldyieldyieldDirectyieldSpecificyieldSpecific

Field Detail

callbackback to summary
private final BlockCallback callback
dummyScopeback to summary
private final StaticScope dummyScope

Constructor Detail

CallBlockback to summary
private CallBlock(ThreadContext context, Signature signature, BlockCallback callback)

Method Detail

adjustArgsback to summary
pack-priv static IRubyObject[] adjustArgs(Block block, IRubyObject[] args)
callback to summary
public IRubyObject call(ThreadContext context, Block block, IRubyObject[] args)

Overrides org.jruby.runtime.BlockBody.call.

Annotations
@Override
callback to summary
public IRubyObject call(ThreadContext context, Block block, IRubyObject[] args, Block blockArg)

Overrides org.jruby.runtime.BlockBody.call.

Annotations
@Override
doYieldback to summary
protected IRubyObject doYield(ThreadContext context, Block block, IRubyObject value)

Implements abstract org.jruby.runtime.BlockBody.doYield.

Doc from org.jruby.runtime.BlockBody.doYield.

Subclass specific yield implementation.

Should not be called directly. Gets called by yield(ThreadContext, Block, org.jruby.runtime.builtin.IRubyObject) after ensuring that any common yield logic is taken care of.

Annotations
@Override
doYieldback to summary
protected IRubyObject doYield(ThreadContext context, Block block, IRubyObject[] args, IRubyObject self)

Implements abstract org.jruby.runtime.BlockBody.doYield.

Doc from org.jruby.runtime.BlockBody.doYield.

Subclass specific yield implementation.

Should not be called directly. Gets called by yield(ThreadContext, Block, org.jruby.runtime.builtin.IRubyObject[], org.jruby.runtime.builtin.IRubyObject) after ensuring that all common yield logic is taken care of.

Annotations
@Override
getFileback to summary
public String getFile()

Implements abstract org.jruby.runtime.BlockBody.getFile.

Doc from org.jruby.runtime.BlockBody.getFile.

Get the filename for this block

getLineback to summary
public int getLine()

Implements abstract org.jruby.runtime.BlockBody.getLine.

Doc from org.jruby.runtime.BlockBody.getLine.

get The line number for this block

getStaticScopeback to summary
public StaticScope getStaticScope()

Implements abstract org.jruby.runtime.BlockBody.getStaticScope.

newCallClosureback to summary
public static Block newCallClosure(IRubyObject self, RubyModule imClass, Signature signature, BlockCallback callback, ThreadContext context)
newCallClosureback to summary
public static Block newCallClosure(ThreadContext context, IRubyObject self, Signature signature, BlockCallback callback)
newCallClosureback to summary
public static Block newCallClosure(IRubyObject self, RubyModule imClass, Arity arity, BlockCallback callback, ThreadContext context)

Deprecated

Annotations
@Deprecated
setStaticScopeback to summary
public void setStaticScope(StaticScope newScope)

Implements abstract org.jruby.runtime.BlockBody.setStaticScope.

yieldSpecificback to summary
public IRubyObject yieldSpecific(ThreadContext context, Block block)

Overrides org.jruby.runtime.BlockBody.yieldSpecific.

Annotations
@Override
yieldSpecificback to summary
public IRubyObject yieldSpecific(ThreadContext context, Block block, IRubyObject arg0)

Overrides org.jruby.runtime.BlockBody.yieldSpecific.

Annotations
@Override