Package org.jruby.ext.ffi.jffi
Class DefaultMethodFactory
java.lang.Object
org.jruby.ext.ffi.jffi.MethodFactory
org.jruby.ext.ffi.jffi.DefaultMethodFactory
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static final classInvokes the native function with a boolean return value.(package private) static final classConverts a ruby Boolean into an 32 bit native integer.(package private) static final classConverts a ruby Buffer into a native address.private static final classInvokes the native function, then passes the return value off to a conversion method to massage it to a custom ruby type.(package private) static final classprivate static final classInvokes the native function with a 128 bit float return value.(package private) static final classConverts a ruby Float into a 128 bit native float.private static final classInvokes the native function with a 32 bit float return value.(package private) static final classConverts a ruby Float into a 32 bit native float.private static final classInvokes the native function with a 64 bit float return value.(package private) static final classConverts a ruby Float into a 64 bit native float.(package private) static classprivate static final classInvokes the native function with a native pointer return value.private static final classInvokes the native function with a native pointer return value.(package private) static classprivate static final classInvokes the native function with n signed 8 bit integer return value.(package private) static final classConverts a ruby Fixnum into a 16 bit native signed integer.private static final classInvokes the native function with a 32 bit integer return value.(package private) static final classConverts a ruby Fixnum into a 32 bit native signed integer.private static final classInvokes the native function with a 64 bit integer return value.(package private) static final classConverts a ruby Fixnum into a 64 bit native signed integer.private static final classInvokes the native function with n signed 8 bit integer return value.(package private) static final classConverts a ruby Fixnum into an 8 bit native integer.private static final classprivate static final classInvokes the native function with a native string return value.(package private) static final classConverts a ruby String into a native pointer.private static final classInvokes the native function with a native struct return value.(package private) static final classConverts a ruby String into a native pointer.private static final classInvokes the native function with an unsigned 32 bit integer return value.(package private) static final classConverts a ruby Fixnum into a 16 bit native unsigned integer.private static final classInvokes the native function with an unsigned 32 bit integer return value.(package private) static final classConverts a ruby Fixnum into a 32 bit native unsigned integer.private static final classInvokes the native function with a 64 bit unsigned integer return value.(package private) static final classConverts a ruby Fixnum into a 64 bit native unsigned integer.private static final classInvokes the native function with an unsigned 8 bit integer return value.(package private) static final classConverts a ruby Fixnum into an 8 bit native unsigned integer.private static final classInvokes the native function with no return type, and returns nil to ruby. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) DynamicMethodcreateMethod(RubyModule module, com.kenai.jffi.Function function, Type returnType, Type[] parameterTypes, com.kenai.jffi.CallingConvention convention, IRubyObject enums, boolean ignoreError) (package private) static ParameterMarshallergetEnumMarshaller(Type type, com.kenai.jffi.CallingConvention convention, IRubyObject enums) Gets a marshaller to convert from a ruby type to a native type.static DefaultMethodFactory(package private) static FunctionInvokergetFunctionInvoker(NativeType returnType) (package private) static FunctionInvokergetFunctionInvoker(Type returnType) (package private) static ParameterMarshallergetMarshaller(NativeType type) Gets a marshaller to convert from a ruby type to a native type.(package private) static ParameterMarshallergetMarshaller(Type type, com.kenai.jffi.CallingConvention convention, IRubyObject enums) Gets a marshaller to convert from a ruby type to a native type.(package private) booleanisSupported(Type returnType, Type[] parameterTypes, com.kenai.jffi.CallingConvention convention) private static ParameterMarshallernewConvertingMarshallerWithHash(Type type, com.kenai.jffi.CallingConvention convention, IRubyObject enums, MappedType ctype) Methods inherited from class org.jruby.ext.ffi.jffi.MethodFactory
createDynamicMethod
-
Constructor Details
-
DefaultMethodFactory
private DefaultMethodFactory()
-
-
Method Details
-
getFactory
-
isSupported
boolean isSupported(Type returnType, Type[] parameterTypes, com.kenai.jffi.CallingConvention convention) - Specified by:
isSupportedin classMethodFactory
-
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:
createMethodin classMethodFactory
-
getFunctionInvoker
-
getFunctionInvoker
-
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
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
-