jnr.ffi.provider.jffi.NullPointerParameterStrategy 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;
/**
*
*/
final class NullPointerParameterStrategy extends PointerParameterStrategy {
static final PointerParameterStrategy INSTANCE = new NullPointerParameterStrategy();
private NullPointerParameterStrategy() {
super(DIRECT);
}
@Override
public long address(Object o) {
return 0;
}
@Override
public Object object(Object o) {
throw new NullPointerException();
}
@Override
public int offset(Object o) {
throw new NullPointerException();
}
@Override
public int length(Object o) {
throw new NullPointerException();
}
}