Class AbstractInvoker

All Implemented Interfaces:
Serializable, Cloneable, Comparable<IRubyObject>, InstanceVariables, InternalVariables, IRubyObject, CoreObjectType
Direct Known Subclasses:
Function, JFFIInvoker, NativeCallbackPointer

public abstract class AbstractInvoker extends Pointer
A native function invoker
See Also:
  • Field Details

  • Constructor Details

    • AbstractInvoker

      protected AbstractInvoker(Ruby runtime, RubyClass klass, int arity, MemoryIO io)
      Creates a new AbstractInvoker instance.
      Parameters:
      arity -
  • Method Details

    • createAbstractInvokerClass

      public static RubyClass createAbstractInvokerClass(Ruby runtime, RubyModule module)
    • attach

      public IRubyObject attach(ThreadContext context, IRubyObject obj, IRubyObject methodName)
      Attaches this function to a ruby module or class.
      Parameters:
      module - The module or class to attach the function to.
      methodName - The ruby name to attach the function as.
    • createDynamicMethod

      protected abstract DynamicMethod createDynamicMethod(RubyModule module)
    • getArity

      public final Arity getArity()
      Returns the Arity of this function.
      Returns:
      The Arity of the native function.