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 Details

    • BYTE_POSITION_SHIFT

      private static final int BYTE_POSITION_SHIFT
      See Also:
    • SHORT_POSITION_SHIFT

      private static final int SHORT_POSITION_SHIFT
      See Also:
    • CHAR_POSITION_SHIFT

      private static final int CHAR_POSITION_SHIFT
      See Also:
    • BOOLEAN_POSITION_SHIFT

      private static final int BOOLEAN_POSITION_SHIFT
      See Also:
    • INT_POSITION_SHIFT

      private static final int INT_POSITION_SHIFT
      See Also:
    • FLOAT_POSITION_SHIFT

      private static final int FLOAT_POSITION_SHIFT
      See Also:
    • LONG_POSITION_SHIFT

      private static final int LONG_POSITION_SHIFT
      See Also:
    • DOUBLE_POSITION_SHIFT

      private static final int DOUBLE_POSITION_SHIFT
      See Also:
    • 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
  • Constructor Details

    • BufferParameterStrategy

      private BufferParameterStrategy(com.kenai.jffi.ObjectParameterStrategy.StrategyType type, com.kenai.jffi.ObjectParameterType.ComponentType componentType)
  • Method Details

    • address

      public static long address(ByteBuffer ptr)
    • address

      public static long address(ShortBuffer ptr)
    • address

      public static long address(CharBuffer ptr)
    • address

      public static long address(IntBuffer ptr)
    • address

      public static long address(FloatBuffer ptr)
    • address

      public static long address(LongBuffer ptr)
    • address

      public static long address(DoubleBuffer ptr)
    • address

      public static long address(Buffer buffer)
    • address

      private static long address(Buffer ptr, int shift)
    • address

      public long address(Object o)
      Specified by:
      address in class com.kenai.jffi.ObjectParameterStrategy
    • object

      public Object object(Object o)
      Specified by:
      object in class com.kenai.jffi.ObjectParameterStrategy
    • offset

      public int offset(Object o)
      Specified by:
      offset in class com.kenai.jffi.ObjectParameterStrategy
    • length

      public int length(Object o)
      Specified by:
      length in class com.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)