jnr.ffi.provider.jffi.DirectBufferMemoryParameterStrategy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jnr-ffi Show documentation
Show all versions of jnr-ffi Show documentation
A library for invoking native functions from java
package jnr.ffi.provider.jffi;
import jnr.ffi.provider.AbstractBufferMemoryIO;
/**
*
*/
final class DirectBufferMemoryParameterStrategy extends AbstractDirectPointerParameterStrategy {
static final PointerParameterStrategy INSTANCE = new DirectBufferMemoryParameterStrategy();
@Override
public long address(Object o) {
AbstractBufferMemoryIO bufferMemoryIO = (AbstractBufferMemoryIO) o;
return AsmRuntime.longValue(bufferMemoryIO.getByteBuffer());
}
}