Package jnr.ffi.provider.jffi
Class BufferParameterStrategy
- java.lang.Object
-
- com.kenai.jffi.ObjectParameterStrategy
-
- jnr.ffi.provider.jffi.ParameterStrategy
-
- jnr.ffi.provider.jffi.BufferParameterStrategy
-
public final class BufferParameterStrategy extends ParameterStrategy
-
-
Field Summary
Fields Modifier and Type Field Description private static BufferParameterStrategy[]
DIRECT_BUFFER_PARAMETER_STRATEGIES
private static BufferParameterStrategy[]
HEAP_BUFFER_PARAMETER_STRATEGIES
private int
shift
-
Fields inherited from class jnr.ffi.provider.jffi.ParameterStrategy
objectCount
-
-
Constructor Summary
Constructors Modifier Constructor Description private
BufferParameterStrategy(com.kenai.jffi.ObjectParameterStrategy.StrategyType type, com.kenai.jffi.ObjectParameterType.ComponentType componentType)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description long
address(java.lang.Object o)
long
address(java.nio.Buffer buffer)
(package private) static int
calculateShift(com.kenai.jffi.ObjectParameterType.ComponentType componentType)
(package private) static BufferParameterStrategy
direct(com.kenai.jffi.ObjectParameterType.ComponentType componentType)
(package private) static BufferParameterStrategy
heap(com.kenai.jffi.ObjectParameterType.ComponentType componentType)
int
length(java.lang.Object o)
java.lang.Object
object(java.lang.Object o)
int
offset(java.lang.Object o)
-
-
-
Field Detail
-
shift
private final int shift
-
DIRECT_BUFFER_PARAMETER_STRATEGIES
private static final BufferParameterStrategy[] DIRECT_BUFFER_PARAMETER_STRATEGIES
-
HEAP_BUFFER_PARAMETER_STRATEGIES
private static final BufferParameterStrategy[] HEAP_BUFFER_PARAMETER_STRATEGIES
-
-
Method Detail
-
address
public long address(java.nio.Buffer buffer)
-
address
public long address(java.lang.Object o)
- Specified by:
address
in classcom.kenai.jffi.ObjectParameterStrategy
-
object
public java.lang.Object object(java.lang.Object o)
- Specified by:
object
in classcom.kenai.jffi.ObjectParameterStrategy
-
offset
public int offset(java.lang.Object o)
- Specified by:
offset
in classcom.kenai.jffi.ObjectParameterStrategy
-
length
public int length(java.lang.Object o)
- Specified by:
length
in classcom.kenai.jffi.ObjectParameterStrategy
-
calculateShift
static int calculateShift(com.kenai.jffi.ObjectParameterType.ComponentType componentType)
-
direct
static BufferParameterStrategy direct(com.kenai.jffi.ObjectParameterType.ComponentType componentType)
-
heap
static BufferParameterStrategy heap(com.kenai.jffi.ObjectParameterType.ComponentType componentType)
-
-