org.jruby.runtime
Class CompiledBlockLight
java.lang.Object
org.jruby.runtime.BlockBody
org.jruby.runtime.CompiledBlockLight
- All Implemented Interfaces:
- JumpTarget
- Direct Known Subclasses:
- CompiledSharedScopeBlock
public class CompiledBlockLight
- extends BlockBody
A Block implemented using a Java-based BlockCallback implementation
rather than with an ICallable. For lightweight block logic within
Java code.
Method Summary |
Arity |
arity()
What is the arity of this block? |
IRubyObject |
call(ThreadContext context,
IRubyObject[] args,
Binding binding,
Block.Type type)
|
Block |
cloneBlock(Binding binding)
|
StaticScope |
getStaticScope()
|
static Block |
newCompiledClosureLight(IRubyObject self,
Frame frame,
Visibility visibility,
RubyModule klass,
DynamicScope dynamicScope,
Arity arity,
StaticScope scope,
CompiledBlockCallback callback,
boolean hasMultipleArgsHead,
int argumentType)
|
static Block |
newCompiledClosureLight(ThreadContext context,
IRubyObject self,
Arity arity,
StaticScope scope,
CompiledBlockCallback callback,
boolean hasMultipleArgsHead,
int argumentType)
|
protected void |
post(ThreadContext context,
Binding binding)
|
protected void |
pre(ThreadContext context,
RubyModule klass,
Binding binding)
|
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)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
callback
protected final CompiledBlockCallback callback
hasMultipleArgsHead
protected final boolean hasMultipleArgsHead
arity
protected final Arity arity
dummyScope
protected final DynamicScope dummyScope
CompiledBlockLight
protected CompiledBlockLight(Arity arity,
DynamicScope dummyScope,
CompiledBlockCallback callback,
boolean hasMultipleArgsHead,
int argumentType)
newCompiledClosureLight
public static Block newCompiledClosureLight(IRubyObject self,
Frame frame,
Visibility visibility,
RubyModule klass,
DynamicScope dynamicScope,
Arity arity,
StaticScope scope,
CompiledBlockCallback callback,
boolean hasMultipleArgsHead,
int argumentType)
newCompiledClosureLight
public static Block newCompiledClosureLight(ThreadContext context,
IRubyObject self,
Arity arity,
StaticScope scope,
CompiledBlockCallback callback,
boolean hasMultipleArgsHead,
int argumentType)
call
public IRubyObject call(ThreadContext context,
IRubyObject[] args,
Binding binding,
Block.Type type)
- Specified by:
call
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
pre
protected void pre(ThreadContext context,
RubyModule klass,
Binding binding)
post
protected void post(ThreadContext context,
Binding binding)
getStaticScope
public StaticScope getStaticScope()
- Specified by:
getStaticScope
in class BlockBody
cloneBlock
public Block cloneBlock(Binding binding)
- Specified by:
cloneBlock
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
Copyright © 2002-2007 JRuby Team. All Rights Reserved.