@MarshalsArray(baseType = byte.class) public static String toObject(Class<?> cls, long handle, long flags, int d1) { return MARSHALER.toObject(cls, handle, flags, d1); } @MarshalsArray(baseType = byte.class)
@MarshalsArray(baseType = byte.class) public static void toNative(String s, long handle, long flags, int d1) { MARSHALER.toNative(s, handle, flags, d1); } }
@MarshalsArray public static <T extends Struct<T>> T toObject(Class<T> cls, long handle, long flags, int d1, int d2) { T s = Struct.toStruct(cls, handle); return s; } @MarshalsArray
@MarshalsArray public static IntBuffer toIntBuffer(Class<?> cls, long handle, long flags, int d1, int d2, int d3) { return toIntBuffer(cls, handle, flags, d1 * d2 * d3); } @MarshalsArray
@MarshalsArray public static LongBuffer toLongBuffer(Class<?> cls, long handle, long flags, int d1) { return VM.newDirectByteBuffer(handle, d1 << 3).order(ByteOrder.nativeOrder()).asLongBuffer(); } @MarshalsArray
@MarshalsArray public static void toNative(LongBuffer buffer, long handle, long flags, int d1) { copyBuffer(buffer, handle, flags, d1); } @MarshalsArray
@MarshalsArray public static FloatBuffer toFloatBuffer(Class<?> cls, long handle, long flags, int d1) { return VM.newDirectByteBuffer(handle, d1 << 2).order(ByteOrder.nativeOrder()).asFloatBuffer(); } @MarshalsArray
@MarshalsArray public static void toNative(FloatBuffer buffer, long handle, long flags, int d1) { copyBuffer(buffer, handle, flags, d1); } @MarshalsArray
@MarshalsArray public static FloatBuffer toFloatBuffer(Class<?> cls, long handle, long flags, int d1, int d2, int d3) { return toFloatBuffer(cls, handle, flags, d1 * d2 * d3); } @MarshalsArray
@MarshalsArray public static void toNative(ByteBuffer buffer, long handle, long flags, int d1, int d2) { copyBuffer(buffer, handle, flags, d1 * d2); } @MarshalsArray
@MarshalsArray public static ShortBuffer toShortBuffer(Class<?> cls, long handle, long flags, int d1, int d2) { return toShortBuffer(cls, handle, flags, d1 * d2); } @MarshalsArray
@MarshalsArray public static void toNative(LongBuffer buffer, long handle, long flags, int d1, int d2) { copyBuffer(buffer, handle, flags, d1 * d2); } @MarshalsArray
@MarshalsArray public static double[][] toObject(Class<?> arrayClass, long handle, long flags, int d1, int d2) { final double[][] o = new double[d1][d2]; final int off = d2 << SHIFT; for (int i = 0; i < d1; i++) { VM.memcpy(VM.getArrayValuesAddress(o[i]), handle, off); handle += off; } return o; } @MarshalsArray
@MarshalsArray public static void toNative(final byte[] o, long handle, long flags, int d1) { final int off = d1 << SHIFT; checkDimensions(TYPE, "", o.length, d1); VM.memcpy(handle, VM.getArrayValuesAddress(o), off); } @MarshalsArray
@MarshalsArray public static short[] toObject(Class<?> arrayClass, long handle, long flags, int d1) { final short[] o = new short[d1]; final int off = d1 << SHIFT; VM.memcpy(VM.getArrayValuesAddress(o), handle, off); return o; } @MarshalsArray
@MarshalsArray public static char[] toObject(Class<?> arrayClass, long handle, long flags, int d1) { final char[] o = new char[d1]; final int off = d1 << SHIFT; VM.memcpy(VM.getArrayValuesAddress(o), handle, off); return o; } @MarshalsArray
@MarshalsArray public static void toNative(final char[] o, long handle, long flags, int d1) { final int off = d1 << SHIFT; checkDimensions(TYPE, "", o.length, d1); VM.memcpy(handle, VM.getArrayValuesAddress(o), off); } @MarshalsArray
@MarshalsArray public static int[][] toObject(Class<?> arrayClass, long handle, long flags, int d1, int d2) { final int[][] o = new int[d1][d2]; final int off = d2 << SHIFT; for (int i = 0; i < d1; i++) { VM.memcpy(VM.getArrayValuesAddress(o[i]), handle, off); handle += off; } return o; } @MarshalsArray
@MarshalsArray public static void toNative(final float[] o, long handle, long flags, int d1) { final int off = d1 << SHIFT; checkDimensions(TYPE, "", o.length, d1); VM.memcpy(handle, VM.getArrayValuesAddress(o), off); } @MarshalsArray
@MarshalsArray public static double[] toObject(Class<?> arrayClass, long handle, long flags, int d1) { final double[] o = new double[d1]; final int off = d1 << SHIFT; VM.memcpy(VM.getArrayValuesAddress(o), handle, off); return o; } @MarshalsArray