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_STRATEGIESprivate static BufferParameterStrategy[]HEAP_BUFFER_PARAMETER_STRATEGIESprivate intshift-
Fields inherited from class jnr.ffi.provider.jffi.ParameterStrategy
objectCount
-
-
Constructor Summary
Constructors Modifier Constructor Description privateBufferParameterStrategy(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 longaddress(java.lang.Object o)longaddress(java.nio.Buffer buffer)(package private) static intcalculateShift(com.kenai.jffi.ObjectParameterType.ComponentType componentType)(package private) static BufferParameterStrategydirect(com.kenai.jffi.ObjectParameterType.ComponentType componentType)(package private) static BufferParameterStrategyheap(com.kenai.jffi.ObjectParameterType.ComponentType componentType)intlength(java.lang.Object o)java.lang.Objectobject(java.lang.Object o)intoffset(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:
addressin classcom.kenai.jffi.ObjectParameterStrategy
-
object
public java.lang.Object object(java.lang.Object o)
- Specified by:
objectin classcom.kenai.jffi.ObjectParameterStrategy
-
offset
public int offset(java.lang.Object o)
- Specified by:
offsetin classcom.kenai.jffi.ObjectParameterStrategy
-
length
public int length(java.lang.Object o)
- Specified by:
lengthin 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)
-
-