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-unixsocket-nodep Show documentation
Show all versions of jnr-unixsocket-nodep Show documentation
com.github.jnr:jnr-unixsocket with orh.objectweb.asm shaded
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());
}
}