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

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

There is a newer version: 0.3.1
Show newest version
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();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy