- 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 asealed
interface, which would prohibit subclassing except by explicitly permitted types.
-
Method Summary
Modifier and TypeMethodDescriptionvargFromAddress(ValueLayout layout, Addressable value)
Adds a native value represented as aMemoryAddress
to the Cva_list
being constructed.vargFromDouble(ValueLayout layout, double value)
Adds a native value represented as adouble
to the Cva_list
being constructed.vargFromInt(ValueLayout layout, int value)
Adds a native value represented as anint
to the Cva_list
being constructed.vargFromLong(ValueLayout layout, long value)
Adds a native value represented as along
to the Cva_list
being constructed.vargFromSegment(GroupLayout layout, MemorySegment value)
Adds a native value represented as aMemorySegment
to the Cva_list
being constructed.
-
Method Details
-
vargFromInt
Adds a native value represented as anint
to the Cva_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
Adds a native value represented as along
to the Cva_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
Adds a native value represented as adouble
to the Cva_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
Adds a native value represented as aMemoryAddress
to the Cva_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
Adds a native value represented as aMemorySegment
to the Cva_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
-