org.jruby.runtime
Class CompiledBlock
java.lang.Object
org.jruby.runtime.BlockBody
org.jruby.runtime.ContextAwareBlockBody
org.jruby.runtime.CompiledBlock
- Direct Known Subclasses:
- CompiledBlockLight
public class CompiledBlock
- extends ContextAwareBlockBody
A Block implemented using a Java-based BlockCallback implementation
rather than with an ICallable. For lightweight block logic within
Java code.
Method Summary |
java.lang.String |
getFile()
Get the filename for this block |
int |
getLine()
get The line number for this block |
static BlockBody |
newCompiledBlock(Arity arity,
StaticScope scope,
CompiledBlockCallback callback,
boolean hasMultipleArgsHead,
int argumentType)
|
static Block |
newCompiledClosure(ThreadContext context,
IRubyObject self,
Arity arity,
StaticScope scope,
CompiledBlockCallback callback,
boolean hasMultipleArgsHead,
int argumentType)
|
static Block |
newCompiledClosure(ThreadContext context,
IRubyObject self,
BlockBody body)
|
protected IRubyObject |
setupBlockArg(Ruby ruby,
IRubyObject value,
IRubyObject self)
|
protected IRubyObject |
setupBlockArgs(ThreadContext context,
IRubyObject value,
IRubyObject self)
|
IRubyObject |
yield(ThreadContext context,
IRubyObject value,
Binding binding,
Block.Type type)
|
IRubyObject |
yield(ThreadContext context,
IRubyObject value,
Binding binding,
Block.Type type,
Block block)
|
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.BlockBody |
asArgumentType, call, call, call, call, call, call, call, call, call, call, getArgumentType, getArgumentTypeWackyHack, getParameterList, isGiven, prepareArgumentsForCall |
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
CompiledBlock
protected CompiledBlock(Arity arity,
StaticScope scope,
CompiledBlockCallback callback,
boolean hasMultipleArgsHead,
int argumentType)
newCompiledClosure
public static Block newCompiledClosure(ThreadContext context,
IRubyObject self,
Arity arity,
StaticScope scope,
CompiledBlockCallback 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,
CompiledBlockCallback callback,
boolean hasMultipleArgsHead,
int argumentType)
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 value,
Binding binding,
Block.Type type,
Block block)
- Overrides:
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
setupBlockArgs
protected IRubyObject setupBlockArgs(ThreadContext context,
IRubyObject value,
IRubyObject self)
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
Copyright © 2002-2009 JRuby Team. All Rights Reserved.