Interface CLinker.VaList.Builder

Enclosing interface:
CLinker.VaList
public static sealed 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.

Method Summary

Modifier and Type Method Description
CLinker.VaList.Builder vargFromAddress(ValueLayout layout, Addressable value)
Adds a native value represented as a MemoryAddress to the C va_list being constructed.
CLinker.VaList.Builder vargFromDouble(ValueLayout layout, double value)
Adds a native value represented as a double to the C va_list being constructed.
CLinker.VaList.Builder vargFromInt(ValueLayout layout, int value)
Adds a native value represented as an int to the C va_list being constructed.
CLinker.VaList.Builder vargFromLong(ValueLayout layout, long value)
Adds a native value represented as a long to the C va_list being constructed.
CLinker.VaList.Builder vargFromSegment(GroupLayout layout, MemorySegment value)
Adds a native value represented as a MemorySegment to the C va_list being constructed.

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

© 1993, 2021, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/17/docs/api/jdk.incubator.foreign/jdk/incubator/foreign/CLinker.VaList.Builder.html