|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jruby.internal.runtime.methods.DynamicMethod
org.jruby.internal.runtime.methods.JavaMethod
public abstract class JavaMethod
Field Summary | |
---|---|
protected Arity |
arity
|
protected int |
arityValue
|
protected StaticScope |
staticScope
|
Fields inherited from class org.jruby.internal.runtime.methods.DynamicMethod |
---|
callConfig, implementationClass, protectedClass, visibility |
Constructor Summary | |
---|---|
protected |
JavaMethod()
|
|
JavaMethod(RubyModule implementationClass,
Visibility visibility)
|
|
JavaMethod(RubyModule implementationClass,
Visibility visibility,
CallConfiguration callConfig,
StaticScope staticScope,
Arity arity)
|
|
JavaMethod(RubyModule implementationClass,
Visibility visibility,
int methodIndex)
|
Method Summary | |
---|---|
abstract IRubyObject |
call(ThreadContext context,
IRubyObject self,
RubyModule clazz,
java.lang.String name,
IRubyObject[] args,
Block block)
The minimum 'call' method required for a dynamic method handle. |
protected void |
callTrace(ThreadContext context,
java.lang.String name)
|
DynamicMethod |
dup()
Duplicate this method, returning DynamicMethod referencing the same code and with the same attributes. |
java.lang.Class[] |
getArgumentTypes()
Deprecated. |
Arity |
getArity()
Retrieve the arity of this method, used for reporting arity to Ruby code. |
java.lang.String |
getJavaName()
|
void |
init(RubyModule implementationClass,
Arity arity,
Visibility visibility,
StaticScope staticScope,
CallConfiguration callConfig)
|
boolean |
isNative()
Returns true if this method is backed by native (i.e. |
boolean |
isSingleton()
|
protected void |
postBacktraceAndScope(ThreadContext context)
|
protected void |
postBacktraceOnly(ThreadContext context)
|
protected void |
postFrameAndScope(ThreadContext context)
|
protected void |
postFrameOnly(ThreadContext context)
|
protected void |
postScopeOnly(ThreadContext context)
|
protected void |
preBacktraceAndScope(ThreadContext context,
java.lang.String name)
|
protected void |
preBacktraceOnly(ThreadContext context,
java.lang.String name)
|
protected void |
preFrameAndDummyScope(ThreadContext context,
IRubyObject self,
java.lang.String name,
Block block)
|
protected void |
preFrameAndScope(ThreadContext context,
IRubyObject self,
java.lang.String name,
Block block)
|
protected void |
preFrameOnly(ThreadContext context,
IRubyObject self,
java.lang.String name,
Block block)
|
protected void |
preScopeOnly(ThreadContext context)
|
protected void |
returnTrace(ThreadContext context,
java.lang.String name)
|
void |
setArgumentTypes(java.lang.Class[] argumentTypes)
Deprecated. |
void |
setArity(Arity arity)
|
void |
setJavaName(java.lang.String javaName)
|
void |
setSingleton(boolean isSingleton)
|
Methods inherited from class org.jruby.internal.runtime.methods.DynamicMethod |
---|
calculateProtectedClass, call, call, call, call, call, call, call, call, call, getCallConfig, getImplementationClass, getProtectedClass, getRealMethod, getVisibility, handleRedo, handleReturn, init, isCallableFrom, isUndefined, setCallConfig, setImplementationClass, setVisibility |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int arityValue
protected Arity arity
protected StaticScope staticScope
Constructor Detail |
---|
public JavaMethod(RubyModule implementationClass, Visibility visibility)
public JavaMethod(RubyModule implementationClass, Visibility visibility, CallConfiguration callConfig, StaticScope staticScope, Arity arity)
public JavaMethod(RubyModule implementationClass, Visibility visibility, int methodIndex)
protected JavaMethod()
Method Detail |
---|
public void init(RubyModule implementationClass, Arity arity, Visibility visibility, StaticScope staticScope, CallConfiguration callConfig)
public abstract IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, java.lang.String name, IRubyObject[] args, Block block)
DynamicMethod
call
in class DynamicMethod
context
- The thread context for the currently executing threadself
- The 'self' or 'receiver' object to use for this callname
- The incoming name used to invoke this methodargs
- The argument list to this invocationblock
- The block passed to this invocation
public DynamicMethod dup()
DynamicMethod
dup
in class DynamicMethod
protected final void preFrameAndScope(ThreadContext context, IRubyObject self, java.lang.String name, Block block)
protected final void preFrameAndDummyScope(ThreadContext context, IRubyObject self, java.lang.String name, Block block)
protected final void preFrameOnly(ThreadContext context, IRubyObject self, java.lang.String name, Block block)
protected final void preScopeOnly(ThreadContext context)
protected final void preBacktraceOnly(ThreadContext context, java.lang.String name)
protected final void preBacktraceAndScope(ThreadContext context, java.lang.String name)
protected final void postFrameAndScope(ThreadContext context)
protected final void postFrameOnly(ThreadContext context)
protected final void postScopeOnly(ThreadContext context)
protected final void postBacktraceOnly(ThreadContext context)
protected final void postBacktraceAndScope(ThreadContext context)
protected final void callTrace(ThreadContext context, java.lang.String name)
protected final void returnTrace(ThreadContext context, java.lang.String name)
public void setArity(Arity arity)
public Arity getArity()
DynamicMethod
getArity
in class DynamicMethod
@Deprecated public void setArgumentTypes(java.lang.Class[] argumentTypes)
@Deprecated public java.lang.Class[] getArgumentTypes()
public void setJavaName(java.lang.String javaName)
public java.lang.String getJavaName()
public void setSingleton(boolean isSingleton)
public boolean isSingleton()
public boolean isNative()
DynamicMethod
isNative
in class DynamicMethod
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |