|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jruby.runtime.callback.ReflectionCallback
A wrapper for java.lang.reflect.Method
objects which implement Ruby methods.
Constructor Summary | |
ReflectionCallback(java.lang.Class type,
java.lang.String methodName,
java.lang.Class[] argumentTypes,
boolean isRestArgs,
boolean isStaticMethod,
Arity arity,
boolean fast)
|
Method Summary | |
IRubyObject |
execute(IRubyObject recv,
IRubyObject[] oargs,
Block block)
Calls a wrapped Ruby method for the specified receiver with the specified arguments. |
Arity |
getArity()
Returns the arity of the wrapped Ruby method. |
protected java.lang.Object[] |
packageRestArgumentsForReflection(java.lang.Object[] originalArgs)
Returns an object array that collects all rest arguments in its own object array which is then put into the last slot of the first object array. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ReflectionCallback(java.lang.Class type, java.lang.String methodName, java.lang.Class[] argumentTypes, boolean isRestArgs, boolean isStaticMethod, Arity arity, boolean fast)
Method Detail |
protected final java.lang.Object[] packageRestArgumentsForReflection(java.lang.Object[] originalArgs)
[1, 2, 3]
is transformed into [1, [2, 3]]
.
public IRubyObject execute(IRubyObject recv, IRubyObject[] oargs, Block block)
execute
in interface Callback
public Arity getArity()
getArity
in interface Callback
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |