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 intBOOLEAN_POSITION_SHIFTprivate static intBYTE_POSITION_SHIFTprivate static intCHAR_POSITION_SHIFTprivate static BufferParameterStrategy[]DIRECT_BUFFER_PARAMETER_STRATEGIESprivate static intDOUBLE_POSITION_SHIFTprivate static intFLOAT_POSITION_SHIFTprivate static BufferParameterStrategy[]HEAP_BUFFER_PARAMETER_STRATEGIESprivate static intINT_POSITION_SHIFTprivate static intLONG_POSITION_SHIFTprivate intshiftprivate static intSHORT_POSITION_SHIFT-
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)static longaddress(java.nio.Buffer buffer)private static longaddress(java.nio.Buffer ptr, int shift)static longaddress(java.nio.ByteBuffer ptr)static longaddress(java.nio.CharBuffer ptr)static longaddress(java.nio.DoubleBuffer ptr)static longaddress(java.nio.FloatBuffer ptr)static longaddress(java.nio.IntBuffer ptr)static longaddress(java.nio.LongBuffer ptr)static longaddress(java.nio.ShortBuffer ptr)(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
-
BYTE_POSITION_SHIFT
private static final int BYTE_POSITION_SHIFT
- See Also:
- Constant Field Values
-
SHORT_POSITION_SHIFT
private static final int SHORT_POSITION_SHIFT
- See Also:
- Constant Field Values
-
CHAR_POSITION_SHIFT
private static final int CHAR_POSITION_SHIFT
- See Also:
- Constant Field Values
-
BOOLEAN_POSITION_SHIFT
private static final int BOOLEAN_POSITION_SHIFT
- See Also:
- Constant Field Values
-
INT_POSITION_SHIFT
private static final int INT_POSITION_SHIFT
- See Also:
- Constant Field Values
-
FLOAT_POSITION_SHIFT
private static final int FLOAT_POSITION_SHIFT
- See Also:
- Constant Field Values
-
LONG_POSITION_SHIFT
private static final int LONG_POSITION_SHIFT
- See Also:
- Constant Field Values
-
DOUBLE_POSITION_SHIFT
private static final int DOUBLE_POSITION_SHIFT
- See Also:
- Constant Field Values
-
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 static long address(java.nio.ByteBuffer ptr)
-
address
public static long address(java.nio.ShortBuffer ptr)
-
address
public static long address(java.nio.CharBuffer ptr)
-
address
public static long address(java.nio.IntBuffer ptr)
-
address
public static long address(java.nio.FloatBuffer ptr)
-
address
public static long address(java.nio.LongBuffer ptr)
-
address
public static long address(java.nio.DoubleBuffer ptr)
-
address
public static long address(java.nio.Buffer buffer)
-
address
private static long address(java.nio.Buffer ptr, int shift)
-
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)
-
-