public abstract class BlockBody extends Object
Modifier and Type | Field and Description |
---|---|
protected int |
argumentType |
static int |
ARRAY |
static String[] |
EMPTY_PARAMETER_LIST |
static int |
MULTIPLE_ASSIGNMENT |
static BlockBody |
NULL_BODY |
static int |
SINGLE_RESTARG |
static int |
ZERO_ARGS |
Constructor and Description |
---|
BlockBody(int argumentType) |
public static final int ZERO_ARGS
public static final int MULTIPLE_ASSIGNMENT
public static final int ARRAY
public static final int SINGLE_RESTARG
public static final String[] EMPTY_PARAMETER_LIST
protected final int argumentType
public static final BlockBody NULL_BODY
public abstract Signature getSignature()
public void setEvalType(EvalType evalType)
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 final IRubyObject yield(ThreadContext context, IRubyObject value, Binding binding, Block.Type type)
public final IRubyObject yield(ThreadContext context, IRubyObject[] args, IRubyObject self, Binding binding, Block.Type type)
protected abstract IRubyObject doYield(ThreadContext context, IRubyObject value, Binding binding, Block.Type type)
Should not be called directly. Gets called by yield(ThreadContext, IRubyObject, Binding, Block.Type)
after ensuring that any common yield logic is taken care of.
protected abstract IRubyObject doYield(ThreadContext context, IRubyObject[] args, IRubyObject self, Binding binding, Block.Type type)
Should not be called directly. Gets called by 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[] args, IRubyObject self, Binding binding, Block.Type type, Block block)
public IRubyObject yield(ThreadContext context, IRubyObject value, Binding binding, Block.Type type, Block block)
public int getArgumentType()
public IRubyObject call(ThreadContext context, Binding binding, Block.Type type)
public IRubyObject call(ThreadContext context, Binding binding, Block.Type type, Block unusedBlock)
public IRubyObject yieldSpecific(ThreadContext context, Binding binding, Block.Type type)
public IRubyObject call(ThreadContext context, IRubyObject arg0, Binding binding, Block.Type type)
public IRubyObject call(ThreadContext context, IRubyObject arg0, Binding binding, Block.Type type, Block unusedBlock)
public IRubyObject yieldSpecific(ThreadContext context, IRubyObject arg0, Binding binding, Block.Type type)
public IRubyObject call(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Binding binding, Block.Type type)
public IRubyObject call(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Binding binding, Block.Type type, Block unusedBlock)
public IRubyObject yieldSpecific(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Binding binding, Block.Type type)
public IRubyObject call(ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Binding binding, Block.Type type)
public IRubyObject call(ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Binding binding, Block.Type type, Block unusedBlock)
public IRubyObject yieldSpecific(ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Binding binding, Block.Type type)
public abstract StaticScope getStaticScope()
public abstract void setStaticScope(StaticScope newScope)
public abstract Arity arity()
public boolean isGiven()
public abstract String getFile()
public abstract int getLine()
public static int asArgumentType(NodeType nodeId)
nodeId
- to be consideredpublic IRubyObject[] prepareArgumentsForCall(ThreadContext context, IRubyObject[] args, Block.Type type)
public String[] getParameterList()
Copyright © 2001-2015 JRuby. All Rights Reserved.