Package jnr.ffi.provider.jffi
Class BufferMethodGenerator
- java.lang.Object
-
- jnr.ffi.provider.jffi.BaseMethodGenerator
-
- jnr.ffi.provider.jffi.BufferMethodGenerator
-
- All Implemented Interfaces:
MethodGenerator
final class BufferMethodGenerator extends BaseMethodGenerator
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
BufferMethodGenerator.InvokeOp
private static class
BufferMethodGenerator.MarshalOp
private static class
BufferMethodGenerator.Operation
-
Field Summary
Fields Modifier and Type Field Description (package private) static java.util.Map<NativeType,BufferMethodGenerator.InvokeOp>
invokeOps
(package private) static java.util.Map<NativeType,BufferMethodGenerator.MarshalOp>
marshalOps
-
Constructor Summary
Constructors Constructor Description BufferMethodGenerator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static void
emitPrimitiveOp(SkinnyMethodAdapter mv, ParameterType parameterType, ToNativeOp op)
(package private) void
generate(AsmBuilder builder, SkinnyMethodAdapter mv, LocalVariableAllocator localVariableAllocator, com.kenai.jffi.CallContext callContext, ResultType resultType, ParameterType[] parameterTypes, boolean ignoreError)
(package private) void
generateBufferInvocation(AsmBuilder builder, SkinnyMethodAdapter mv, LocalVariableAllocator localVariableAllocator, com.kenai.jffi.CallContext callContext, ResultType resultType, ParameterType[] parameterTypes)
(package private) static boolean
isSessionRequired(ParameterType parameterType)
(package private) static boolean
isSessionRequired(ParameterType[] parameterTypes)
boolean
isSupported(ResultType resultType, ParameterType[] parameterTypes, CallingConvention callingConvention)
-
Methods inherited from class jnr.ffi.provider.jffi.BaseMethodGenerator
emitEpilogue, emitPostInvoke, generate, isPostInvokeRequired, loadAndConvertParameter
-
-
-
-
Field Detail
-
marshalOps
static final java.util.Map<NativeType,BufferMethodGenerator.MarshalOp> marshalOps
-
invokeOps
static final java.util.Map<NativeType,BufferMethodGenerator.InvokeOp> invokeOps
-
-
Method Detail
-
generate
void generate(AsmBuilder builder, SkinnyMethodAdapter mv, LocalVariableAllocator localVariableAllocator, com.kenai.jffi.CallContext callContext, ResultType resultType, ParameterType[] parameterTypes, boolean ignoreError)
- Specified by:
generate
in classBaseMethodGenerator
-
isSupported
public boolean isSupported(ResultType resultType, ParameterType[] parameterTypes, CallingConvention callingConvention)
-
emitPrimitiveOp
private static void emitPrimitiveOp(SkinnyMethodAdapter mv, ParameterType parameterType, ToNativeOp op)
-
isSessionRequired
static boolean isSessionRequired(ParameterType parameterType)
-
isSessionRequired
static boolean isSessionRequired(ParameterType[] parameterTypes)
-
generateBufferInvocation
void generateBufferInvocation(AsmBuilder builder, SkinnyMethodAdapter mv, LocalVariableAllocator localVariableAllocator, com.kenai.jffi.CallContext callContext, ResultType resultType, ParameterType[] parameterTypes)
-
-