org.jruby.internal.runtime.methods
Class JavaMethod

java.lang.Object
  extended by org.jruby.internal.runtime.methods.DynamicMethod
      extended by org.jruby.internal.runtime.methods.JavaMethod
All Implemented Interfaces:
java.lang.Cloneable, JumpTarget
Direct Known Subclasses:
CompiledMethod, JavaMethod.JavaMethodNoBlock, JavaMethod.JavaMethodOne, JavaMethod.JavaMethodOneBlock, JavaMethod.JavaMethodOneOrTwo, JavaMethod.JavaMethodOneOrTwoBlock, JavaMethod.JavaMethodOneOrTwoOrThree, JavaMethod.JavaMethodThree, JavaMethod.JavaMethodThreeBlock, JavaMethod.JavaMethodTwo, JavaMethod.JavaMethodTwoBlock, JavaMethod.JavaMethodTwoOrThree, JavaMethod.JavaMethodZero, JavaMethod.JavaMethodZeroBlock, JavaMethod.JavaMethodZeroOrOne, JavaMethod.JavaMethodZeroOrOneOrTwo, ReflectedJavaMethod, ReflectedJavaMultiMethod

public abstract class JavaMethod
extends DynamicMethod
implements JumpTarget, java.lang.Cloneable


Nested Class Summary
static class JavaMethod.JavaMethodNoBlock
           
static class JavaMethod.JavaMethodOne
           
static class JavaMethod.JavaMethodOneBlock
           
static class JavaMethod.JavaMethodOneOrTwo
           
static class JavaMethod.JavaMethodOneOrTwoBlock
           
static class JavaMethod.JavaMethodOneOrTwoOrThree
           
static class JavaMethod.JavaMethodThree
           
static class JavaMethod.JavaMethodThreeBlock
           
static class JavaMethod.JavaMethodTwo
           
static class JavaMethod.JavaMethodTwoBlock
           
static class JavaMethod.JavaMethodTwoOrThree
           
static class JavaMethod.JavaMethodZero
           
static class JavaMethod.JavaMethodZeroBlock
           
static class JavaMethod.JavaMethodZeroOrOne
           
static class JavaMethod.JavaMethodZeroOrOneOrTwo
           
 
Field Summary
protected  Arity arity
           
protected  int arityValue
           
protected  int methodIndex
           
protected  StaticScope staticScope
           
 
Fields inherited from class org.jruby.internal.runtime.methods.DynamicMethod
callConfig, implementationClass, visibility
 
Constructor Summary
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)
          Call the method
 DynamicMethod dup()
           
 java.lang.Class[] getArgumentTypes()
          Deprecated. 
 Arity getArity()
           
 java.lang.String getJavaName()
           
protected  IRubyObject handleReturnJump(JumpException.ReturnJump rj)
           
 boolean isNative()
          Returns true if this method is backed by native (i.e.
 boolean isSingleton()
           
protected  void post(ThreadContext context)
           
protected  void pre(ThreadContext context, IRubyObject self, java.lang.String name, Block block)
           
 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
call, call, call, call, call, call, call, call, call, getCallConfig, getImplementationClass, getRealMethod, getVisibility, 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

arityValue

protected int arityValue

arity

protected Arity arity

methodIndex

protected final int methodIndex

staticScope

protected final StaticScope staticScope
Constructor Detail

JavaMethod

public JavaMethod(RubyModule implementationClass,
                  Visibility visibility)

JavaMethod

public JavaMethod(RubyModule implementationClass,
                  Visibility visibility,
                  CallConfiguration callConfig,
                  StaticScope staticScope,
                  Arity arity)

JavaMethod

public JavaMethod(RubyModule implementationClass,
                  Visibility visibility,
                  int methodIndex)
Method Detail

call

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

Specified by:
call in class DynamicMethod
Parameters:
context - is the thread-specific information that this method is being invoked on

dup

public DynamicMethod dup()
Specified by:
dup in class DynamicMethod

pre

protected void pre(ThreadContext context,
                   IRubyObject self,
                   java.lang.String name,
                   Block block)

post

protected void post(ThreadContext context)

handleReturnJump

protected IRubyObject handleReturnJump(JumpException.ReturnJump rj)

setArity

public void setArity(Arity arity)

getArity

public Arity getArity()
Overrides:
getArity in class DynamicMethod

setArgumentTypes

@Deprecated
public void setArgumentTypes(java.lang.Class[] argumentTypes)
Deprecated. 


getArgumentTypes

@Deprecated
public java.lang.Class[] getArgumentTypes()
Deprecated. 


setJavaName

public void setJavaName(java.lang.String javaName)

getJavaName

public java.lang.String getJavaName()

setSingleton

public void setSingleton(boolean isSingleton)

isSingleton

public boolean isSingleton()

isNative

public boolean isNative()
Description copied from class: DynamicMethod
Returns true if this method is backed by native (i.e. Java) code

Overrides:
isNative in class DynamicMethod


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