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 |
Adds a native value represented as a MemoryAddress to the C va_list being constructed. |
CLinker.VaList.Builder |
vargFromDouble |
Adds a native value represented as a double to the C va_list being constructed. |
CLinker.VaList.Builder |
vargFromInt |
Adds a native value represented as an int to the C va_list being constructed. |
CLinker.VaList.Builder |
vargFromLong |
Adds a native value represented as a long to the C va_list being constructed. |
CLinker.VaList.Builder |
vargFromSegment |
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 anint
. - Returns:
- this builder.
- Throws:
-
IllegalArgumentException
- if the given memory layout is not compatible withint
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 along
. - Returns:
- this builder.
- Throws:
-
IllegalArgumentException
- if the given memory layout is not compatible withlong
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 adouble
. - Returns:
- this builder.
- Throws:
-
IllegalArgumentException
- if the given memory layout is not compatible withdouble
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 aAddressable
. - Returns:
- this builder.
- Throws:
-
IllegalArgumentException
- if the given memory layout is not compatible withMemoryAddress
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 aMemorySegment
. - Returns:
- this builder.
- Throws:
-
IllegalArgumentException
- if the given memory layout is not compatible withMemorySegment
© 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