public class CompiledBlock extends ContextAwareBlockBody
Modifier and Type | Field and Description |
---|---|
protected CompiledBlockCallback |
callback |
protected boolean |
hasMultipleArgsHead |
scope, signature
argumentType, ARRAY, EMPTY_PARAMETER_LIST, MULTIPLE_ASSIGNMENT, NULL_BODY, SINGLE_RESTARG, ZERO_ARGS
Constructor and Description |
---|
CompiledBlock(Arity arity,
StaticScope scope,
CompiledBlockCallback callback,
boolean hasMultipleArgsHead,
int argumentType) |
CompiledBlock(Signature signature,
StaticScope scope,
CompiledBlockCallback callback,
boolean hasMultipleArgsHead,
int argumentType) |
Modifier and Type | Method and Description |
---|---|
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
|
static BlockBody |
newCompiledBlock(Arity arity,
StaticScope scope,
CompiledBlockCallback callback,
boolean hasMultipleArgsHead,
int argumentType) |
static Block |
newCompiledClosure(ThreadContext context,
IRubyObject self,
Arity arity,
StaticScope scope,
CompiledBlockCallback callback,
boolean hasMultipleArgsHead,
int argumentType)
Deprecated.
|
static Block |
newCompiledClosure(ThreadContext context,
IRubyObject self,
BlockBody body) |
static Block |
newCompiledClosure(ThreadContext context,
IRubyObject self,
Signature signature,
StaticScope scope,
CompiledBlockCallback callback,
boolean hasMultipleArgsHead,
int argumentType) |
protected IRubyObject |
setupBlockArg(Ruby ruby,
IRubyObject value,
IRubyObject self) |
protected IRubyObject |
setupBlockArgs(ThreadContext context,
IRubyObject value,
IRubyObject self) |
IRubyObject |
yield(ThreadContext context,
IRubyObject[] args,
IRubyObject self,
Binding binding,
Block.Type type,
Block block) |
IRubyObject |
yield(ThreadContext context,
IRubyObject value,
Binding binding,
Block.Type type,
Block block) |
IRubyObject |
yieldSpecific(ThreadContext context,
Binding binding,
Block.Type type) |
IRubyObject |
yieldSpecific(ThreadContext context,
IRubyObject arg0,
Binding binding,
Block.Type type) |
IRubyObject |
yieldSpecific(ThreadContext context,
IRubyObject arg0,
IRubyObject arg1,
Binding binding,
Block.Type type) |
IRubyObject |
yieldSpecific(ThreadContext context,
IRubyObject arg0,
IRubyObject arg1,
IRubyObject arg2,
Binding binding,
Block.Type type) |
arity, getSignature, getStaticScope, post, pre, setStaticScope
asArgumentType, call, call, call, call, call, call, call, call, call, call, getArgumentType, getArgumentTypeWackyHack, getParameterList, isGiven, prepareArgumentsForCall, setEvalType, yield, yield
protected final CompiledBlockCallback callback
protected final boolean hasMultipleArgsHead
public CompiledBlock(Signature signature, StaticScope scope, CompiledBlockCallback callback, boolean hasMultipleArgsHead, int argumentType)
public CompiledBlock(Arity arity, StaticScope scope, CompiledBlockCallback callback, boolean hasMultipleArgsHead, int argumentType)
@Deprecated public static Block newCompiledClosure(ThreadContext context, IRubyObject self, Arity arity, StaticScope scope, CompiledBlockCallback callback, boolean hasMultipleArgsHead, int argumentType)
public static Block newCompiledClosure(ThreadContext context, IRubyObject self, Signature signature, StaticScope scope, CompiledBlockCallback callback, boolean hasMultipleArgsHead, int argumentType)
public static Block newCompiledClosure(ThreadContext context, IRubyObject self, BlockBody body)
public static BlockBody newCompiledBlock(Arity arity, StaticScope scope, CompiledBlockCallback callback, boolean hasMultipleArgsHead, int argumentType)
public IRubyObject yieldSpecific(ThreadContext context, Binding binding, Block.Type type)
yieldSpecific
in class BlockBody
public IRubyObject yieldSpecific(ThreadContext context, IRubyObject arg0, Binding binding, Block.Type type)
yieldSpecific
in class BlockBody
public IRubyObject yieldSpecific(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Binding binding, Block.Type type)
yieldSpecific
in class BlockBody
public IRubyObject yieldSpecific(ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Binding binding, Block.Type type)
yieldSpecific
in class BlockBody
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 IRubyObject yield(ThreadContext context, IRubyObject value, Binding binding, Block.Type type, Block block)
public IRubyObject yield(ThreadContext context, IRubyObject[] args, IRubyObject self, Binding binding, Block.Type type, Block block)
protected IRubyObject setupBlockArgs(ThreadContext context, IRubyObject value, IRubyObject self)
protected IRubyObject setupBlockArg(Ruby ruby, IRubyObject value, IRubyObject self)
public String getFile()
BlockBody
Copyright © 2001-2015 JRuby. All Rights Reserved.