org.jruby.runtime
Class CompiledBlock19

java.lang.Object
  extended by org.jruby.runtime.BlockBody
      extended by org.jruby.runtime.ContextAwareBlockBody
          extended by org.jruby.runtime.CompiledBlock19
Direct Known Subclasses:
CompiledBlockLight19

public class CompiledBlock19
extends ContextAwareBlockBody

A Block implemented using a Java-based BlockCallback implementation rather than with an ICallable. For lightweight block logic within Java code.


Field Summary
protected  CompiledBlockCallback19 callback
           
protected  boolean hasMultipleArgsHead
           
protected  java.lang.String[] parameterList
           
 
Fields inherited from class org.jruby.runtime.ContextAwareBlockBody
scope
 
Fields inherited from class org.jruby.runtime.BlockBody
argumentType, ARRAY, EMPTY_PARAMETER_LIST, MULTIPLE_ASSIGNMENT, NULL_BODY, SINGLE_RESTARG, ZERO_ARGS
 
Constructor Summary
protected CompiledBlock19(Arity arity, StaticScope scope, CompiledBlockCallback19 callback, boolean hasMultipleArgsHead, int argumentType, java.lang.String[] parameterList)
           
 
Method Summary
 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
 java.lang.String[] getParameterList()
           
static BlockBody newCompiledBlock(Arity arity, StaticScope scope, CompiledBlockCallback19 callback, boolean hasMultipleArgsHead, int argumentType, java.lang.String[] parameterList)
           
static Block newCompiledClosure(ThreadContext context, IRubyObject self, Arity arity, StaticScope scope, CompiledBlockCallback19 callback, boolean hasMultipleArgsHead, int argumentType)
           
static Block newCompiledClosure(ThreadContext context, IRubyObject self, BlockBody body)
           
protected  IRubyObject[] setupBlockArg(Ruby ruby, IRubyObject value, IRubyObject self)
           
 IRubyObject yield(ThreadContext context, IRubyObject value, Binding binding, Block.Type type)
           
 IRubyObject yield(ThreadContext context, IRubyObject args, IRubyObject self, RubyModule klass, boolean aValue, Binding binding, Block.Type type)
           
 IRubyObject yield(ThreadContext context, IRubyObject args, IRubyObject self, RubyModule klass, boolean aValue, 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)
           
 
Methods inherited from class org.jruby.runtime.ContextAwareBlockBody
arity, cloneBlock, getStaticScope, post, pre, setStaticScope
 
Methods inherited from class org.jruby.runtime.BlockBody
asArgumentType, call, call, call, call, call, call, call, call, getArgumentType, getArgumentTypeWackyHack, isGiven, prepareArgumentsForCall, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

callback

protected final CompiledBlockCallback19 callback

hasMultipleArgsHead

protected final boolean hasMultipleArgsHead

parameterList

protected final java.lang.String[] parameterList
Constructor Detail

CompiledBlock19

protected CompiledBlock19(Arity arity,
                          StaticScope scope,
                          CompiledBlockCallback19 callback,
                          boolean hasMultipleArgsHead,
                          int argumentType,
                          java.lang.String[] parameterList)
Method Detail

newCompiledClosure

public static Block newCompiledClosure(ThreadContext context,
                                       IRubyObject self,
                                       Arity arity,
                                       StaticScope scope,
                                       CompiledBlockCallback19 callback,
                                       boolean hasMultipleArgsHead,
                                       int argumentType)

newCompiledClosure

public static Block newCompiledClosure(ThreadContext context,
                                       IRubyObject self,
                                       BlockBody body)

newCompiledBlock

public static BlockBody newCompiledBlock(Arity arity,
                                         StaticScope scope,
                                         CompiledBlockCallback19 callback,
                                         boolean hasMultipleArgsHead,
                                         int argumentType,
                                         java.lang.String[] parameterList)

call

public IRubyObject call(ThreadContext context,
                        IRubyObject[] args,
                        Binding binding,
                        Block.Type type)
Overrides:
call in class BlockBody

call

public IRubyObject call(ThreadContext context,
                        IRubyObject[] args,
                        Binding binding,
                        Block.Type type,
                        Block block)
Overrides:
call in class BlockBody

yieldSpecific

public IRubyObject yieldSpecific(ThreadContext context,
                                 Binding binding,
                                 Block.Type type)
Overrides:
yieldSpecific in class BlockBody

yieldSpecific

public IRubyObject yieldSpecific(ThreadContext context,
                                 IRubyObject arg0,
                                 Binding binding,
                                 Block.Type type)
Overrides:
yieldSpecific in class BlockBody

yieldSpecific

public IRubyObject yieldSpecific(ThreadContext context,
                                 IRubyObject arg0,
                                 IRubyObject arg1,
                                 Binding binding,
                                 Block.Type type)
Overrides:
yieldSpecific in class BlockBody

yieldSpecific

public IRubyObject yieldSpecific(ThreadContext context,
                                 IRubyObject arg0,
                                 IRubyObject arg1,
                                 IRubyObject arg2,
                                 Binding binding,
                                 Block.Type type)
Overrides:
yieldSpecific in class BlockBody

yield

public IRubyObject yield(ThreadContext context,
                         IRubyObject value,
                         Binding binding,
                         Block.Type type)
Specified by:
yield in class BlockBody

yield

public IRubyObject yield(ThreadContext context,
                         IRubyObject args,
                         IRubyObject self,
                         RubyModule klass,
                         boolean aValue,
                         Binding binding,
                         Block.Type type)
Specified by:
yield in class BlockBody

yield

public IRubyObject yield(ThreadContext context,
                         IRubyObject args,
                         IRubyObject self,
                         RubyModule klass,
                         boolean aValue,
                         Binding binding,
                         Block.Type type,
                         Block block)
Overrides:
yield in class BlockBody

setupBlockArg

protected IRubyObject[] setupBlockArg(Ruby ruby,
                                      IRubyObject value,
                                      IRubyObject self)

getFile

public java.lang.String getFile()
Description copied from class: BlockBody
Get the filename for this block

Specified by:
getFile in class BlockBody

getLine

public int getLine()
Description copied from class: BlockBody
get The line number for this block

Specified by:
getLine in class BlockBody

getParameterList

public java.lang.String[] getParameterList()
Overrides:
getParameterList in class BlockBody


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