Top Description Fields Constructors Methods
org.jruby.runtime

public abstract Class JavaInternalBlockBody

extends BlockBody
Class Inheritance
Known Direct Subclasses
org.jruby.ext.set.RubySet.EachBody, org.jruby.javasupport.ext.JavaLang.Runnable.RunBody
Imports
org.jruby.Ruby, org.jruby.parser.StaticScope, org.jruby.runtime.builtin.IRubyObject, org.jruby.util.ArraySupport

Represents a special Java implementation of a block.

Field Summary

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

Constructor Summary

AccessConstructor and Description
public
JavaInternalBlockBody(Ruby runtime, Signature signature)

For blocks which can be executed in any thread concurrently.

public
JavaInternalBlockBody(Ruby runtime, ThreadContext originalContext, String methodName, Signature signature)

For blocks which cannot be executed in parallel.

public
JavaInternalBlockBody(Ruby runtime, Arity arity)
Deprecated

Method Summary

Modifier and TypeMethod and Description
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 void
private void
threadCheck(ThreadContext yieldingContext)

public abstract IRubyObject
yield(ThreadContext context, IRubyObject[] args)

public IRubyObject
Inherited from org.jruby.runtime.BlockBody:
aritycallcallcallcallcallcallcallcallcallDirectcanCallDirectgetArgumentDescriptorsgetSignaturegetTestBlockBodyisGivenisRubyBlockprepareArgumentsForCalltestBlockBodyyieldyieldyieldyieldyieldDirectyieldSpecificyieldSpecificyieldSpecificyieldSpecific

Field Detail

dummyScopeback to summary
private final StaticScope dummyScope
methodNameback to summary
private final String methodName
originalContextback to summary
private final ThreadContext originalContext

Constructor Detail

JavaInternalBlockBodyback to summary
public JavaInternalBlockBody(Ruby runtime, Signature signature)

For blocks which can be executed in any thread concurrently.

JavaInternalBlockBodyback to summary
public JavaInternalBlockBody(Ruby runtime, ThreadContext originalContext, String methodName, Signature signature)

For blocks which cannot be executed in parallel.

JavaInternalBlockBodyback to summary
public JavaInternalBlockBody(Ruby runtime, Arity arity)

Deprecated

Annotations
@Deprecated

Method Detail

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

Annotations
@Override
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

Annotations
@Override
getStaticScopeback to summary
public StaticScope getStaticScope()

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

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

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

Annotations
@Override
threadCheckback to summary
private void threadCheck(ThreadContext yieldingContext)
yieldback to summary
public abstract IRubyObject yield(ThreadContext context, IRubyObject[] args)
yieldback to summary
public IRubyObject yield(ThreadContext context, IRubyObject arg)