Class RubyToJavaInvoker<T extends JavaCallable>

All Implemented Interfaces:
Cloneable, MethodArgs2, NativeCallMethod
Direct Known Subclasses:
ConstructorInvoker, MethodInvoker

public abstract class RubyToJavaInvoker<T extends JavaCallable> extends JavaMethod
  • Field Details

    • javaCallable

      protected T extends JavaCallable javaCallable
    • javaCallables

      protected T extends JavaCallable[][] javaCallables
    • javaVarargsCallables

      protected T extends JavaCallable[] javaVarargsCallables
  • Method Details

    • getSignature

      public final T getSignature(int signatureCode)
      Internal API
      Parameters:
      signatureCode -
      Returns:
      callable
    • putSignature

      public final void putSignature(int signatureCode, T callable)
      Internal API
      Parameters:
      signatureCode -
      callable -
    • createCallable

      protected abstract T createCallable(Ruby runtime, Member member)
    • createCallableArray

      protected abstract T[] createCallableArray(T callable)
    • createCallableArray

      protected abstract T[] createCallableArray(int size)
    • createCallableArrayArray

      protected abstract T[][] createCallableArrayArray(int size)
    • getMemberParameterTypes

      protected abstract Class[] getMemberParameterTypes(Member member)
    • isMemberVarArgs

      @Deprecated protected abstract boolean isMemberVarArgs(Member member)
      Deprecated.
    • convertArguments

      public static Object[] convertArguments(ParameterTypes method, IRubyObject[] args)
    • convertArguments

      public static Object[] convertArguments(ParameterTypes method, IRubyObject[] args, int addSpace)
    • convertArguments

      public static Object[] convertArguments(ParameterTypes method, IRubyObject arg0, int addSpace)
    • findCallable

      public T findCallable(IRubyObject self, String name, IRubyObject[] args, int arity)
      Find the matching callable object given the target proxy wrapper, method name, arguments, and actual arity.
      Parameters:
      self - the proxy wrapper
      name - the method name
      args - the arguments
      arity - the actual arity
      Returns:
      a suitable callable, or else raises an argument or name error
    • findCallableArityZero

      protected final T findCallableArityZero(IRubyObject self, String name)
    • findCallableArityOne

      protected final T findCallableArityOne(IRubyObject self, String name, IRubyObject arg0)
    • findCallableArityTwo

      protected final T findCallableArityTwo(IRubyObject self, String name, IRubyObject arg0, IRubyObject arg1)
    • findCallableArityThree

      protected final T findCallableArityThree(IRubyObject self, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2)
    • findCallableArityFour

      protected final T findCallableArityFour(IRubyObject self, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3)