- 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 TypeMethodDescriptionaddVarg
(GroupLayout layout, MemorySegment value) Writes aMemorySegment
value, with given layout, to the variable argument list being constructed.addVarg
(ValueLayout.OfAddress layout, Addressable value) Writes anAddressable
value to the variable argument list being constructed.addVarg
(ValueLayout.OfDouble layout, double value) Writes adouble
value to the variable argument list being constructed.addVarg
(ValueLayout.OfInt layout, int value) Writes anint
value to the variable argument list being constructed.addVarg
(ValueLayout.OfLong layout, long value) Writes along
value to the variable argument list being constructed.
-
Method Details
-
addVarg
Writes anint
value to the variable argument list being constructed.- Parameters:
layout
- the layout of the value to be written.value
- theint
value to be written.- Returns:
- this builder.
-
addVarg
Writes along
value to the variable argument list being constructed.- Parameters:
layout
- the layout of the value to be written.value
- thelong
value to be written.- Returns:
- this builder.
-
addVarg
Writes adouble
value to the variable argument list being constructed.- Parameters:
layout
- the layout of the value to be written.value
- thedouble
value to be written.- Returns:
- this builder.
-
addVarg
Writes anAddressable
value to the variable argument list being constructed.- Parameters:
layout
- the layout of the value to be written.value
- theAddressable
value to be written.- Returns:
- this builder.
-
addVarg
Writes aMemorySegment
value, with given layout, to the variable argument list being constructed.- Parameters:
layout
- the layout of the value to be written.value
- theMemorySegment
whose contents will be copied.- Returns:
- this builder.
-