org.jruby.internal.runtime.methods
Class DynamicMethod

java.lang.Object
  extended byorg.jruby.internal.runtime.methods.DynamicMethod
Direct Known Subclasses:
AliasMethod, CompiledMethod, DefaultMethod, FullFunctionCallbackMethod, FullFunctionReflectedMethod, FullInvocationMethod, MethodMethod, ProcMethod, SimpleCallbackMethod, SimpleInvocationMethod, SimpleReflectedMethod, UndefinedMethod, WrapperMethod, YARVMethod

public abstract class DynamicMethod
extends java.lang.Object

Author:
jpetersen

Field Summary
protected  RubyModule implementationClass
           
protected  Visibility visibility
           
 
Constructor Summary
protected DynamicMethod(RubyModule implementationClass, Visibility visibility)
           
 
Method Summary
 IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, java.lang.String name, IRubyObject[] args, boolean noSuper, Block block)
          Call the method
abstract  DynamicMethod dup()
           
 Arity getArity()
           
 RubyModule getImplementationClass()
           
 Visibility getVisibility()
           
protected abstract  IRubyObject internalCall(ThreadContext context, RubyModule clazz, IRubyObject self, java.lang.String name, IRubyObject[] args, boolean noSuper, Block block)
           
 boolean isCallableFrom(IRubyObject caller, CallType callType)
           
 boolean isUndefined()
           
protected abstract  void postMethod(ThreadContext context)
           
protected abstract  void preMethod(ThreadContext context, RubyModule clazz, IRubyObject self, java.lang.String name, IRubyObject[] args, boolean noSuper, Block block)
           
 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
Constructor Detail

DynamicMethod

protected DynamicMethod(RubyModule implementationClass,
                        Visibility visibility)
Method Detail

call

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

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

postMethod

protected abstract void postMethod(ThreadContext context)

internalCall

protected abstract IRubyObject internalCall(ThreadContext context,
                                            RubyModule clazz,
                                            IRubyObject self,
                                            java.lang.String name,
                                            IRubyObject[] args,
                                            boolean noSuper,
                                            Block block)

preMethod

protected abstract void preMethod(ThreadContext context,
                                  RubyModule clazz,
                                  IRubyObject self,
                                  java.lang.String name,
                                  IRubyObject[] args,
                                  boolean noSuper,
                                  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()


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