Class DefaultMethodFactory

java.lang.Object
org.jruby.ext.ffi.jffi.MethodFactory
org.jruby.ext.ffi.jffi.DefaultMethodFactory

public final class DefaultMethodFactory extends MethodFactory
  • Constructor Details

    • DefaultMethodFactory

      private DefaultMethodFactory()
  • Method Details

    • getFactory

      public static DefaultMethodFactory getFactory()
    • isSupported

      boolean isSupported(Type returnType, Type[] parameterTypes, com.kenai.jffi.CallingConvention convention)
      Specified by:
      isSupported in class MethodFactory
    • createMethod

      DynamicMethod createMethod(RubyModule module, com.kenai.jffi.Function function, Type returnType, Type[] parameterTypes, com.kenai.jffi.CallingConvention convention, IRubyObject enums, boolean ignoreError)
      Specified by:
      createMethod in class MethodFactory
    • getFunctionInvoker

      static FunctionInvoker getFunctionInvoker(Type returnType)
    • getFunctionInvoker

      static FunctionInvoker getFunctionInvoker(NativeType returnType)
    • getMarshaller

      static ParameterMarshaller getMarshaller(Type type, com.kenai.jffi.CallingConvention convention, IRubyObject enums)
      Gets a marshaller to convert from a ruby type to a native type.
      Parameters:
      type - The native type to convert to.
      Returns:
      A new Marshaller
    • newConvertingMarshallerWithHash

      private static ParameterMarshaller newConvertingMarshallerWithHash(Type type, com.kenai.jffi.CallingConvention convention, IRubyObject enums, MappedType ctype)
    • getEnumMarshaller

      static ParameterMarshaller getEnumMarshaller(Type type, com.kenai.jffi.CallingConvention convention, IRubyObject enums)
      Gets a marshaller to convert from a ruby type to a native type.
      Parameters:
      type - The native type to convert to.
      enums - The enum map
      Returns:
      A new ParameterMarshaller
    • getMarshaller

      static ParameterMarshaller getMarshaller(NativeType type)
      Gets a marshaller to convert from a ruby type to a native type.
      Parameters:
      type - The native type to convert to.
      Returns:
      A new ParameterMarshaller