public abstract class JavaInternalBlockBody extends BlockBody
argumentType, ARRAY, EMPTY_PARAMETER_LIST, MULTIPLE_ASSIGNMENT, NULL_BODY, SINGLE_RESTARG, ZERO_ARGS| Constructor and Description |
|---|
JavaInternalBlockBody(Ruby runtime,
Arity arity)
For blocks which can be executed in any thread concurrently.
|
JavaInternalBlockBody(Ruby runtime,
ThreadContext originalContext,
String methodName,
Arity arity)
For blocks which cannot be executed in parallel.
|
| Modifier and Type | Method and Description |
|---|---|
Arity |
arity()
What is the arity of this block?
|
IRubyObject |
call(ThreadContext context,
IRubyObject[] args,
Binding binding,
Block.Type type) |
IRubyObject |
call(ThreadContext context,
IRubyObject[] args,
Binding binding,
Block.Type type,
Block block) |
protected IRubyObject |
doYield(ThreadContext context,
IRubyObject[] args,
IRubyObject self,
Binding binding,
Block.Type type)
Subclass specific yield implementation.
|
protected IRubyObject |
doYield(ThreadContext context,
IRubyObject value,
Binding binding,
Block.Type type)
Subclass specific yield implementation.
|
String |
getFile()
Get the filename for this block
|
int |
getLine()
get The line number for this block
|
StaticScope |
getStaticScope() |
void |
setStaticScope(StaticScope newScope) |
abstract IRubyObject |
yield(ThreadContext context,
IRubyObject[] args) |
asArgumentType, call, call, call, call, call, call, call, call, getArgumentType, getArgumentTypeWackyHack, getParameterList, isGiven, prepareArgumentsForCall, setEvalType, yield, yield, yield, yield, yieldSpecific, yieldSpecific, yieldSpecific, yieldSpecificpublic JavaInternalBlockBody(Ruby runtime, Arity arity)
public JavaInternalBlockBody(Ruby runtime, ThreadContext originalContext, String methodName, Arity arity)
methodName - arity - public IRubyObject call(ThreadContext context, IRubyObject[] args, Binding binding, Block.Type type)
public IRubyObject call(ThreadContext context, IRubyObject[] args, Binding binding, Block.Type type, Block block)
protected IRubyObject doYield(ThreadContext context, IRubyObject value, Binding binding, Block.Type type)
BlockBody
Should not be called directly. Gets called by BlockBody.yield(ThreadContext, IRubyObject, Binding, Block.Type)
after ensuring that any common yield logic is taken care of.
protected IRubyObject doYield(ThreadContext context, IRubyObject[] args, IRubyObject self, Binding binding, Block.Type type)
BlockBody
Should not be called directly. Gets called by BlockBody.yield(ThreadContext, org.jruby.runtime.builtin.IRubyObject[], org.jruby.runtime.builtin.IRubyObject, Binding, org.jruby.runtime.Block.Type)
after ensuring that all common yield logic is taken care of.
public abstract IRubyObject yield(ThreadContext context, IRubyObject[] args)
public StaticScope getStaticScope()
getStaticScope in class BlockBodypublic void setStaticScope(StaticScope newScope)
setStaticScope in class BlockBodypublic Arity arity()
BlockBodypublic String getFile()
BlockBodyCopyright © 2001-2015 JRuby. All Rights Reserved.