public abstract class JavaInternalBlockBody extends BlockBody
| Modifier and Type | Field and Description |
|---|---|
private Arity |
arity |
private StaticScope |
dummyScope |
private java.lang.String |
methodName |
private ThreadContext |
originalContext |
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,
java.lang.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) |
java.lang.String |
getFile()
Get the filename for this block
|
int |
getLine()
get The line number for this block
|
StaticScope |
getStaticScope() |
void |
setStaticScope(StaticScope newScope) |
private void |
threadCheck(ThreadContext yieldingContext) |
abstract IRubyObject |
yield(ThreadContext context,
IRubyObject value) |
IRubyObject |
yield(ThreadContext context,
IRubyObject value,
Binding binding,
Block.Type type) |
IRubyObject |
yield(ThreadContext context,
IRubyObject value,
IRubyObject self,
RubyModule klass,
boolean aValue,
Binding binding,
Block.Type type) |
asArgumentType, call, call, call, call, call, call, call, call, getArgumentType, getArgumentTypeWackyHack, getParameterList, isGiven, newArgsArrayFromArgsWithoutUnbox, newArgsArrayFromArgsWithUnbox, prepareArgumentsForCall, yield, yield, yieldSpecific, yieldSpecific, yieldSpecific, yieldSpecificprivate final Arity arity
private final ThreadContext originalContext
private final java.lang.String methodName
private final StaticScope dummyScope
public JavaInternalBlockBody(Ruby runtime, Arity arity)
public JavaInternalBlockBody(Ruby runtime, ThreadContext originalContext, java.lang.String methodName, Arity arity)
methodName - arity - private void threadCheck(ThreadContext yieldingContext)
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)
public IRubyObject yield(ThreadContext context, IRubyObject value, Binding binding, Block.Type type)
public IRubyObject yield(ThreadContext context, IRubyObject value, IRubyObject self, RubyModule klass, boolean aValue, Binding binding, Block.Type type)
public abstract IRubyObject yield(ThreadContext context, IRubyObject value)
public StaticScope getStaticScope()
getStaticScope in class BlockBodypublic void setStaticScope(StaticScope newScope)
setStaticScope in class BlockBodypublic Arity arity()
BlockBodypublic java.lang.String getFile()
BlockBody