org.jruby.runtime
Class ContextAwareBlockBody

java.lang.Object
  extended by org.jruby.runtime.BlockBody
      extended by org.jruby.runtime.ContextAwareBlockBody
Direct Known Subclasses:
CompiledBlock, CompiledBlock19, Interpreted19Block, InterpretedBlock, InterpretedIRBlockBody, MethodBlock

public abstract class ContextAwareBlockBody
extends BlockBody

Common type for all block types which share similar values that ThreadContext uses.


Field Summary
protected  StaticScope scope
          The static scope for the block body
 
Fields inherited from class org.jruby.runtime.BlockBody
argumentType, ARRAY, EMPTY_PARAMETER_LIST, MULTIPLE_ASSIGNMENT, NULL_BODY, SINGLE_RESTARG, ZERO_ARGS
 
Constructor Summary
ContextAwareBlockBody(StaticScope scope, Arity arity, int argumentType)
           
 
Method Summary
 Arity arity()
          What is the arity of this block?
 Block cloneBlock(Binding binding)
           
 StaticScope getStaticScope()
           
protected  void post(ThreadContext context, Binding binding, Visibility vis, Frame lastFrame)
           
protected  Frame pre(ThreadContext context, RubyModule klass, Binding binding)
           
 void setStaticScope(StaticScope newScope)
           
 
Methods inherited from class org.jruby.runtime.BlockBody
asArgumentType, call, call, call, call, call, call, call, call, call, call, getArgumentType, getArgumentTypeWackyHack, getFile, getLine, getParameterList, isGiven, prepareArgumentsForCall, yield, yield, yield, yield, yieldSpecific, yieldSpecific, yieldSpecific, yieldSpecific
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

scope

protected StaticScope scope
The static scope for the block body

Constructor Detail

ContextAwareBlockBody

public ContextAwareBlockBody(StaticScope scope,
                             Arity arity,
                             int argumentType)
Method Detail

pre

protected Frame pre(ThreadContext context,
                    RubyModule klass,
                    Binding binding)

post

protected void post(ThreadContext context,
                    Binding binding,
                    Visibility vis,
                    Frame lastFrame)

getStaticScope

public StaticScope getStaticScope()
Specified by:
getStaticScope in class BlockBody

setStaticScope

public void setStaticScope(StaticScope newScope)
Specified by:
setStaticScope in class BlockBody

arity

public Arity arity()
Description copied from class: BlockBody
What is the arity of this block?

Specified by:
arity in class BlockBody
Returns:
the arity

cloneBlock

public Block cloneBlock(Binding binding)
Specified by:
cloneBlock in class BlockBody


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