jnr.ffi.provider.jffi.NullObjectParameterStrategy 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;
/**
*
*/
public final class NullObjectParameterStrategy extends ParameterStrategy {
public static final ParameterStrategy NULL = new NullObjectParameterStrategy();
public NullObjectParameterStrategy() {
super(DIRECT);
}
@Override
public long address(Object parameter) {
return 0;
}
@Override
public Object object(Object parameter) {
throw new NullPointerException("null reference");
}
@Override
public int offset(Object parameter) {
throw new NullPointerException("null reference");
}
@Override
public int length(Object parameter) {
throw new NullPointerException("null reference");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy