org.jruby.internal.runtime.methods
Class DynamicMethod

java.lang.Object
  extended by org.jruby.internal.runtime.methods.DynamicMethod
Direct Known Subclasses:
AliasMethod, DefaultMethod, FullFunctionCallbackMethod, JavaMethod, MethodMethod, ProcMethod, RubiniusMethod, SimpleCallbackMethod, UndefinedMethod, WrapperMethod, YARVMethod

public abstract class DynamicMethod
extends java.lang.Object

Author:
jpetersen

Field Summary
protected  CallConfiguration callConfig
           
protected  RubyModule implementationClass
           
protected  Visibility visibility
           
 
Constructor Summary
protected DynamicMethod(RubyModule implementationClass, Visibility visibility, CallConfiguration callConfig)
           
 
Method Summary
 IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, java.lang.String name)
           
 IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, java.lang.String name, Block block)
           
 IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, java.lang.String name, IRubyObject arg)
           
 IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, java.lang.String name, IRubyObject[] args)
           
abstract  IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, java.lang.String name, IRubyObject[] args, Block block)
          Call the method
 IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, java.lang.String name, IRubyObject arg, Block block)
           
 IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, java.lang.String name, IRubyObject arg1, IRubyObject arg2)
           
 IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, java.lang.String name, IRubyObject arg1, IRubyObject arg2, Block block)
           
 IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, java.lang.String name, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3)
           
 IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, java.lang.String name, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, Block block)
           
abstract  DynamicMethod dup()
           
 Arity getArity()
           
 CallConfiguration getCallConfig()
           
 RubyModule getImplementationClass()
           
 DynamicMethod getRealMethod()
           
 Visibility getVisibility()
           
 boolean isCallableFrom(IRubyObject caller, CallType callType)
           
 boolean isNative()
          Returns true if this method is backed by native (i.e.
 boolean isUndefined()
           
 void setCallConfig(CallConfiguration callConfig)
           
 void setImplementationClass(RubyModule implClass)
           
 void setVisibility(Visibility visibility)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

implementationClass

protected RubyModule implementationClass

visibility

protected Visibility visibility

callConfig

protected CallConfiguration callConfig
Constructor Detail

DynamicMethod

protected DynamicMethod(RubyModule implementationClass,
                        Visibility visibility,
                        CallConfiguration callConfig)
Method Detail

call

public abstract IRubyObject call(ThreadContext context,
                                 IRubyObject self,
                                 RubyModule clazz,
                                 java.lang.String name,
                                 IRubyObject[] args,
                                 Block block)
Call the method

Parameters:
context - is the thread-specific information that this method is being invoked on
receiver -

call

public IRubyObject call(ThreadContext context,
                        IRubyObject self,
                        RubyModule clazz,
                        java.lang.String name,
                        IRubyObject[] args)

call

public IRubyObject call(ThreadContext context,
                        IRubyObject self,
                        RubyModule klazz,
                        java.lang.String name)

call

public IRubyObject call(ThreadContext context,
                        IRubyObject self,
                        RubyModule klazz,
                        java.lang.String name,
                        Block block)

call

public IRubyObject call(ThreadContext context,
                        IRubyObject self,
                        RubyModule klazz,
                        java.lang.String name,
                        IRubyObject arg)

call

public IRubyObject call(ThreadContext context,
                        IRubyObject self,
                        RubyModule klazz,
                        java.lang.String name,
                        IRubyObject arg,
                        Block block)

call

public IRubyObject call(ThreadContext context,
                        IRubyObject self,
                        RubyModule klazz,
                        java.lang.String name,
                        IRubyObject arg1,
                        IRubyObject arg2)

call

public IRubyObject call(ThreadContext context,
                        IRubyObject self,
                        RubyModule klazz,
                        java.lang.String name,
                        IRubyObject arg1,
                        IRubyObject arg2,
                        Block block)

call

public IRubyObject call(ThreadContext context,
                        IRubyObject self,
                        RubyModule klazz,
                        java.lang.String name,
                        IRubyObject arg1,
                        IRubyObject arg2,
                        IRubyObject arg3)

call

public IRubyObject call(ThreadContext context,
                        IRubyObject self,
                        RubyModule klazz,
                        java.lang.String name,
                        IRubyObject arg1,
                        IRubyObject arg2,
                        IRubyObject arg3,
                        Block block)

dup

public abstract DynamicMethod dup()

isCallableFrom

public boolean isCallableFrom(IRubyObject caller,
                              CallType callType)

getImplementationClass

public RubyModule getImplementationClass()

setImplementationClass

public void setImplementationClass(RubyModule implClass)

getVisibility

public Visibility getVisibility()

setVisibility

public void setVisibility(Visibility visibility)

isUndefined

public boolean isUndefined()

getArity

public Arity getArity()

getRealMethod

public DynamicMethod getRealMethod()

getCallConfig

public CallConfiguration getCallConfig()

setCallConfig

public void setCallConfig(CallConfiguration callConfig)

isNative

public boolean isNative()
Returns true if this method is backed by native (i.e. Java) code



Copyright © 2002-2007 JRuby Team. All Rights Reserved.