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

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

There is a newer version: 2.2.16
Show newest version
package jnr.ffi.provider.jffi;

import com.kenai.jffi.ObjectParameterStrategy;
import com.kenai.jffi.ObjectParameterType;

/**
 *
 */
abstract public class PointerParameterStrategy extends ObjectParameterStrategy {
    /* objectCount is accessed directly from asm code - do not change */
    public final int objectCount;

    protected PointerParameterStrategy(StrategyType type) {
        super(type);
        objectCount = type == HEAP ? 1 : 0;
    }

    protected PointerParameterStrategy(StrategyType type, ObjectParameterType parameterType) {
        super(type, parameterType);
        objectCount = type == HEAP ? 1 : 0;
    }


    public long getAddress(Object o) {
        return address(o);
    }

    public abstract long address(Object o);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy