org.jruby.runtime
Class CompiledBlock19
java.lang.Object
org.jruby.runtime.BlockBody
org.jruby.runtime.ContextAwareBlockBody
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.
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.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 |
callback
protected final CompiledBlockCallback19 callback
hasMultipleArgsHead
protected final boolean hasMultipleArgsHead
parameterList
protected final java.lang.String[] parameterList
CompiledBlock19
protected CompiledBlock19(Arity arity,
StaticScope scope,
CompiledBlockCallback19 callback,
boolean hasMultipleArgsHead,
int argumentType,
java.lang.String[] parameterList)
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.