Interface CLinker.VaList.Builder

Enclosing interface:
CLinker.VaList

public static interface CLinker.VaList.Builder
A builder interface used to construct a C va_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.

API Note:
In the future, if the Java language permits, CLinker.VaList.Builder may become a sealed interface, which would prohibit subclassing except by explicitly permitted types.
  • Method Details

    • vargFromInt

      CLinker.VaList.Builder vargFromInt(ValueLayout layout, int value)
      Adds a native value represented as an int to the C va_list being constructed.
      Parameters:
      layout - the native layout of the value.
      value - the value, represented as an int.
      Returns:
      this builder.
      Throws:
      IllegalArgumentException - if the given memory layout is not compatible with int
    • vargFromLong

      CLinker.VaList.Builder vargFromLong(ValueLayout layout, long value)
      Adds a native value represented as a long to the C va_list being constructed.
      Parameters:
      layout - the native layout of the value.
      value - the value, represented as a long.
      Returns:
      this builder.
      Throws:
      IllegalArgumentException - if the given memory layout is not compatible with long
    • vargFromDouble

      CLinker.VaList.Builder vargFromDouble(ValueLayout layout, double value)
      Adds a native value represented as a double to the C va_list being constructed.
      Parameters:
      layout - the native layout of the value.
      value - the value, represented as a double.
      Returns:
      this builder.
      Throws:
      IllegalArgumentException - if the given memory layout is not compatible with double
    • vargFromAddress

      CLinker.VaList.Builder vargFromAddress(ValueLayout layout, Addressable value)
      Adds a native value represented as a MemoryAddress to the C va_list being constructed.
      Parameters:
      layout - the native layout of the value.
      value - the value, represented as a Addressable.
      Returns:
      this builder.
      Throws:
      IllegalArgumentException - if the given memory layout is not compatible with MemoryAddress
    • vargFromSegment

      CLinker.VaList.Builder vargFromSegment(GroupLayout layout, MemorySegment value)
      Adds a native value represented as a MemorySegment to the C va_list being constructed.
      Parameters:
      layout - the native layout of the value.
      value - the value, represented as a MemorySegment.
      Returns:
      this builder.
      Throws:
      IllegalArgumentException - if the given memory layout is not compatible with MemorySegment