Class NativeCallbackFactory

java.lang.Object
org.jruby.ext.ffi.jffi.NativeCallbackFactory

public class NativeCallbackFactory extends Object
  • Field Details

  • Constructor Details

    • NativeCallbackFactory

      public NativeCallbackFactory(Ruby runtime, CallbackInfo cbInfo)
  • Method Details

    • getCallback

      public final Pointer getCallback(RubyObject callable)
    • getCallback

      public final Pointer getCallback(IRubyObject callable, CachingCallSite callSite)
    • getCallbackPointer

      private Pointer getCallbackPointer(IRubyObject callable, CachingCallSite callSite)
    • newCallback

      NativeCallbackPointer newCallback(IRubyObject callable, CachingCallSite callSite)
    • newCallback

      NativeCallbackPointer newCallback(Object callable)
    • newFunctionInfo

      private final NativeFunctionInfo newFunctionInfo(Ruby runtime, CallbackInfo cbInfo)
    • isReturnTypeValid

      private static final boolean isReturnTypeValid(Type type)
      Checks if a type is a valid callback return type
      Parameters:
      type - The type to examine
      Returns:
      true if type is a valid return type for a callback.
    • isParameterTypeValid

      private static final boolean isParameterTypeValid(Type type)
      Checks if a type is a valid parameter type for a callback
      Parameters:
      type - The type to examine
      Returns:
      true if type is a valid parameter type for a callback.