// Path: stubs-shared/src/main/java/org/freedesktop/wayland/util/jaccall/wl_argument.java
// @Struct(union = true,
//         value = {
//                 @Field(name = "i",
//                        type = CType.INT),
//                 @Field(name = "u",
//                        type = CType.INT),
//                 @Field(name = "f",
//                        type = CType.INT),
//                 @Field(name = "s",
//                        type = CType.POINTER,
//                        dataType = String.class),
//                 @Field(name = "o",
//                        type = CType.POINTER),
//                 @Field(name = "n",
//                        type = CType.INT),
//                 @Field(name = "a",
//                        type = CType.POINTER,
//                        dataType = wl_array.class),
//                 @Field(name = "h",
//                        type = CType.INT)
//         })
// public final class wl_argument extends wl_argument_Jaccall_StructType {
// }
// 
// Path: stubs-shared/src/main/java/org/freedesktop/wayland/util/jaccall/wl_array.java
// @Struct({
//                 @Field(name = "size",
//                        type = CType.LONG_LONG),
//                 @Field(name = "alloc",
//                        type = CType.LONG_LONG),
//                 @Field(name = "data",
//                        type = CType.POINTER)
//         })
// public final class wl_array extends wl_array_Jaccall_StructType {
// 
// }


import org.freedesktop.jaccall.Pointer;
import org.freedesktop.wayland.util.jaccall.wl_argument;
import org.freedesktop.wayland.util.jaccall.wl_array;
import java.nio.ByteBuffer;
import java.util.LinkedList;
import java.util.List;
import static org.freedesktop.jaccall.Pointer.malloc;
import static org.freedesktop.jaccall.Pointer.nref;
import static org.freedesktop.jaccall.Pointer.ref;
import static org.freedesktop.jaccall.Pointer.wrap;
        return this;
    }

    /**
     * const char *s; string
     *
     * @param index
     * @param s
     *
     * @return
     */
    public Arguments set(final int index,
                         final String s) {
        final Pointer<String> stringPointer = nref(s);
        this.argumentRefs.add(stringPointer);
        this.pointer.get(index)
                    .setS(stringPointer);
        return this;
    }

    /**
     * struct wl_array *a; array
     *
     * @param index
     * @param array
     *
     * @return
     */
    public Arguments set(final int index,
                         final ByteBuffer array) {
// Path: stubs-shared/src/main/java/org/freedesktop/wayland/util/jaccall/wl_argument.java
// @Struct(union = true,
//         value = {
//                 @Field(name = "i",
//                        type = CType.INT),
//                 @Field(name = "u",
//                        type = CType.INT),
//                 @Field(name = "f",
//                        type = CType.INT),
//                 @Field(name = "s",
//                        type = CType.POINTER,
//                        dataType = String.class),
//                 @Field(name = "o",
//                        type = CType.POINTER),
//                 @Field(name = "n",
//                        type = CType.INT),
//                 @Field(name = "a",
//                        type = CType.POINTER,
//                        dataType = wl_array.class),
//                 @Field(name = "h",
//                        type = CType.INT)
//         })
// public final class wl_argument extends wl_argument_Jaccall_StructType {
// }
// 
// Path: stubs-shared/src/main/java/org/freedesktop/wayland/util/jaccall/wl_array.java
// @Struct({
//                 @Field(name = "size",
//                        type = CType.LONG_LONG),
//                 @Field(name = "alloc",
//                        type = CType.LONG_LONG),
//                 @Field(name = "data",
//                        type = CType.POINTER)
//         })
// public final class wl_array extends wl_array_Jaccall_StructType {
// 
// }


// Path: stubs-shared/src/main/java/org/freedesktop/wayland/util/Arguments.java
import org.freedesktop.jaccall.Pointer;
import org.freedesktop.wayland.util.jaccall.wl_argument;
import org.freedesktop.wayland.util.jaccall.wl_array;
import java.nio.ByteBuffer;
import java.util.LinkedList;
import java.util.List;
import static org.freedesktop.jaccall.Pointer.malloc;
import static org.freedesktop.jaccall.Pointer.nref;
import static org.freedesktop.jaccall.Pointer.ref;
import static org.freedesktop.jaccall.Pointer.wrap;

        return this;
    }

    /**
     * const char *s; string
     *
     * @param index
     * @param s
     *
     * @return
     */
    public Arguments set(final int index,
                         final String s) {
        final Pointer<String> stringPointer = nref(s);
        this.argumentRefs.add(stringPointer);
        this.pointer.get(index)
                    .setS(stringPointer);
        return this;
    }

    /**
     * struct wl_array *a; array
     *
     * @param index
     * @param array
     *
     * @return
     */
    public Arguments set(final int index,
                         final ByteBuffer array) {
        final wl_array wlArray = new wl_array();