org.jruby.cext
Class NativeMethod2

java.lang.Object
  extended by org.jruby.internal.runtime.methods.DynamicMethod
      extended by org.jruby.cext.NativeMethod
          extended by org.jruby.cext.NativeMethod2

public final class NativeMethod2
extends NativeMethod

NativeMethod2 represents an arity-2 native method. This class is for call optimization.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.jruby.internal.runtime.methods.DynamicMethod
DynamicMethod.NativeCall
 
Field Summary
 
Fields inherited from class org.jruby.cext.NativeMethod
arity, function
 
Fields inherited from class org.jruby.internal.runtime.methods.DynamicMethod
builtin, callConfig, implementationClass, name, nativeCall, notImplemented, protectedClass, serialNumber, visibility
 
Constructor Summary
NativeMethod2(RubyModule clazz, int arity, long function)
           
 
Method Summary
 IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, java.lang.String name, IRubyObject arg0, IRubyObject arg1)
          Arity 2, no block
 IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, java.lang.String name, IRubyObject arg0, IRubyObject arg1, Block block)
          Arity 2, with block; calls through IRubyObject[] path
 
Methods inherited from class org.jruby.cext.NativeMethod
call, call, dup, getArity, isNative
 
Methods inherited from class org.jruby.internal.runtime.methods.DynamicMethod
calculateProtectedClass, call, call, call, call, call, call, call, call, call, call, call, call, call, call, call, call, call, call, call, call, getCallConfig, getImplementationClass, getName, getNativeCall, getProtectedClass, getRealMethod, getSerialNumber, getVisibility, handleBreak, handleRedo, handleReturn, init, isBuiltin, isCallableFrom, isNotImplemented, isUndefined, setCallConfig, setImplementationClass, setIsBuiltin, setName, setNativeCall, setNotImplemented, setVisibility
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NativeMethod2

public NativeMethod2(RubyModule clazz,
                     int arity,
                     long function)
Method Detail

call

public final IRubyObject call(ThreadContext context,
                              IRubyObject self,
                              RubyModule klazz,
                              java.lang.String name,
                              IRubyObject arg0,
                              IRubyObject arg1)
Description copied from class: DynamicMethod
Arity 2, no block

Overrides:
call in class DynamicMethod

call

public final IRubyObject call(ThreadContext context,
                              IRubyObject self,
                              RubyModule klazz,
                              java.lang.String name,
                              IRubyObject arg0,
                              IRubyObject arg1,
                              Block block)
Description copied from class: DynamicMethod
Arity 2, with block; calls through IRubyObject[] path

Overrides:
call in class DynamicMethod


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