public abstract class BlockBody
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static BlockBody |
NULL_BODY |
protected Signature |
signature |
protected java.lang.invoke.MethodHandle |
testBlockBody |
protected final Signature signature
protected volatile java.lang.invoke.MethodHandle testBlockBody
public static final BlockBody NULL_BODY
public BlockBody(Signature signature)
public Signature getSignature()
public EvalType getEvalType()
public void setEvalType(EvalType evalType)
public boolean canCallDirect()
public java.lang.invoke.MethodHandle getTestBlockBody()
protected IRubyObject callDirect(ThreadContext context, Block block, IRubyObject[] args, Block blockArg)
protected IRubyObject yieldDirect(ThreadContext context, Block block, IRubyObject[] args, IRubyObject self)
public IRubyObject call(ThreadContext context, Block block, IRubyObject[] args)
public IRubyObject call(ThreadContext context, Block block, IRubyObject[] args, Block blockArg)
public final IRubyObject yield(ThreadContext context, Block block, IRubyObject value)
public final IRubyObject yield(ThreadContext context, Block block, IRubyObject[] args, IRubyObject self)
protected abstract IRubyObject doYield(ThreadContext context, Block block, IRubyObject value)
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.
protected abstract IRubyObject doYield(ThreadContext context, Block block, IRubyObject[] args, IRubyObject self)
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.
public IRubyObject yield(ThreadContext context, Block block, IRubyObject[] args, IRubyObject self, Block blockArg)
public IRubyObject yield(ThreadContext context, Block block, IRubyObject value, Block blockArg)
public IRubyObject call(ThreadContext context, Block block)
public IRubyObject call(ThreadContext context, Block block, Block unusedBlock)
public IRubyObject yieldSpecific(ThreadContext context, Block block)
public IRubyObject call(ThreadContext context, Block block, IRubyObject arg0)
public IRubyObject call(ThreadContext context, Block block, IRubyObject arg0, Block unusedBlock)
public IRubyObject yieldSpecific(ThreadContext context, Block block, IRubyObject arg0)
public IRubyObject call(ThreadContext context, Block block, IRubyObject arg0, IRubyObject arg1)
public IRubyObject call(ThreadContext context, Block block, IRubyObject arg0, IRubyObject arg1, Block unusedBlock)
public IRubyObject yieldSpecific(ThreadContext context, Block block, IRubyObject arg0, IRubyObject arg1)
public IRubyObject call(ThreadContext context, Block block, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2)
public IRubyObject call(ThreadContext context, Block block, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block unusedBlock)
public IRubyObject yieldSpecific(ThreadContext context, Block block, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2)
public abstract StaticScope getStaticScope()
public abstract void setStaticScope(StaticScope newScope)
@Deprecated public Arity arity()
public boolean isGiven()
public abstract java.lang.String getFile()
public abstract int getLine()
public IRubyObject[] prepareArgumentsForCall(ThreadContext context, IRubyObject[] args, Block.Type type)
public ArgumentDescriptor[] getArgumentDescriptors()
Copyright © 2001-2018 JRuby. All Rights Reserved.