All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jnr.ffi.provider.jffi.NullObjectParameterStrategy Maven / Gradle / Ivy

There is a newer version: 2.2.17
Show newest version
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