Package Summary Overview Summary

Module jdk.incubator.foreign
Package jdk.incubator.foreign

# Interface VaList.Builder

Enclosing interface:
  `VaList`

public static sealed interface VaList.Builder
A builder interface used to construct a variable argument list.

Unless otherwise specified, passing a `null` argument, or an array argument containing one or more `null` elements to a method in this class causes a `NullPointerException` to be thrown.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `VaList.Builder`
  `addVarg (GroupLayout layout, MemorySegment value)`
  Writes a `MemorySegment` value, with given layout, to the variable argument list being constructed.
  `VaList.Builder`
  `addVarg (ValueLayout.OfAddress layout, Addressable value)`
  Writes an `Addressable` value to the variable argument list being constructed.
  `VaList.Builder`
  `addVarg (ValueLayout.OfDouble layout, double value)`
  Writes a `double` value to the variable argument list being constructed.
  `VaList.Builder`
  `addVarg (ValueLayout.OfInt layout, int value)`
  Writes an `int` value to the variable argument list being constructed.
  `VaList.Builder`
  `addVarg (ValueLayout.OfLong layout, long value)`
  Writes a `long` value to the variable argument list being constructed.

- ## Method Details

  - ### addVarg

    VaList.Builder addVarg (ValueLayout.OfInt layout, int value)
    Writes an `int` value to the variable argument list being constructed.
    Parameters:
      `layout` - the layout of the value to be written.
      `value` - the `int` value to be written.
    Returns:
      this builder.

  - ### addVarg

    VaList.Builder addVarg (ValueLayout.OfLong layout, long value)
    Writes a `long` value to the variable argument list being constructed.
    Parameters:
      `layout` - the layout of the value to be written.
      `value` - the `long` value to be written.
    Returns:
      this builder.

  - ### addVarg

    VaList.Builder addVarg (ValueLayout.OfDouble layout, double value)
    Writes a `double` value to the variable argument list being constructed.
    Parameters:
      `layout` - the layout of the value to be written.
      `value` - the `double` value to be written.
    Returns:
      this builder.

  - ### addVarg

    VaList.Builder addVarg (ValueLayout.OfAddress layout, Addressable value)
    Writes an `Addressable` value to the variable argument list being constructed.
    Parameters:
      `layout` - the layout of the value to be written.
      `value` - the `Addressable` value to be written.
    Returns:
      this builder.

  - ### addVarg

    VaList.Builder addVarg (GroupLayout layout, MemorySegment value)
    Writes a `MemorySegment` value, with given layout, to the variable argument list being constructed.
    Parameters:
      `layout` - the layout of the value to be written.
      `value` - the `MemorySegment` whose contents will be copied.
    Returns:
      this builder.