org.jruby.runtime.assigner
Class Assigner

java.lang.Object
  extended by org.jruby.runtime.assigner.Assigner
Direct Known Subclasses:
Pre0Rest0Post0Assigner, Pre0Rest0Post0BlockAssigner, Pre0Rest1Post0Assigner, Pre0Rest1Post0BlockAssigner, Pre1ExpandedRest0Post0Assigner, Pre1ExpandedRest0Post0BlockAssigner, Pre1Rest0Post0Assigner, Pre1Rest0Post0BlockAssigner, Pre1Rest1Post0Assigner, Pre1Rest1Post0BlockAssigner, Pre2Rest0Post0Assigner, Pre2Rest0Post0BlockAssigner, Pre2Rest1Post0Assigner, Pre2Rest1Post0BlockAssigner, Pre3Rest0Post0Assigner, Pre3Rest0Post0BlockAssigner, Pre3Rest1Post0Assigner, Pre3Rest1Post0BlockAssigner, PreManyRest0Post0Assigner, PreManyRest0Post0BlockAssigner, PreManyRest1Post0Assigner, PreManyRest1Post0BlockAssigner

public abstract class Assigner
extends java.lang.Object

Base class for block assignment logic. This class and all subclasses tries to minimize the amount of conditional logic for doing simple assignment to block parameters during block invocation. The naming conventions for subclasses is the same logic used by the interpreter to represent all parameter types with their arity: pre - Require parameters before the rest argument (if there is one) opt - optional argument (name = value) [1.9] rest - A rest argument is present post - required arguments at the end of the list [1.9] There is also some logic about expanded/non-expanded arguments. This refers to ParserSupport.new_yield and YieldNode expanded attribute.


Constructor Summary
Assigner()
           
 
Method Summary
abstract  void assign(Ruby runtime, ThreadContext context, IRubyObject self, Block block)
           
abstract  void assign(Ruby runtime, ThreadContext context, IRubyObject self, IRubyObject[] values, Block block)
           
abstract  void assign(Ruby runtime, ThreadContext context, IRubyObject self, IRubyObject value1, Block block)
           
abstract  void assign(Ruby runtime, ThreadContext context, IRubyObject self, IRubyObject value1, IRubyObject value2, Block block)
           
abstract  void assign(Ruby runtime, ThreadContext context, IRubyObject self, IRubyObject value1, IRubyObject value2, IRubyObject value3, Block block)
           
abstract  void assignArray(Ruby runtime, ThreadContext context, IRubyObject self, IRubyObject values, Block block)
           
 IRubyObject convertIfAlreadyArray(Ruby runtime, IRubyObject value)
           
 IRubyObject convertToArray(Ruby runtime, IRubyObject value)
           
protected  IRubyObject[] shiftedArray(IRubyObject[] originalValues, int numberOfElementsToShift)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Assigner

public Assigner()
Method Detail

assign

public abstract void assign(Ruby runtime,
                            ThreadContext context,
                            IRubyObject self,
                            Block block)

assign

public abstract void assign(Ruby runtime,
                            ThreadContext context,
                            IRubyObject self,
                            IRubyObject value1,
                            Block block)

assign

public abstract void assign(Ruby runtime,
                            ThreadContext context,
                            IRubyObject self,
                            IRubyObject value1,
                            IRubyObject value2,
                            Block block)

assign

public abstract void assign(Ruby runtime,
                            ThreadContext context,
                            IRubyObject self,
                            IRubyObject value1,
                            IRubyObject value2,
                            IRubyObject value3,
                            Block block)

assign

public abstract void assign(Ruby runtime,
                            ThreadContext context,
                            IRubyObject self,
                            IRubyObject[] values,
                            Block block)

assignArray

public abstract void assignArray(Ruby runtime,
                                 ThreadContext context,
                                 IRubyObject self,
                                 IRubyObject values,
                                 Block block)

convertToArray

public IRubyObject convertToArray(Ruby runtime,
                                  IRubyObject value)

convertIfAlreadyArray

public IRubyObject convertIfAlreadyArray(Ruby runtime,
                                         IRubyObject value)

shiftedArray

protected IRubyObject[] shiftedArray(IRubyObject[] originalValues,
                                     int numberOfElementsToShift)


Copyright © 2002-2009 JRuby Team. All Rights Reserved.