public class Va_list
extends java.lang.Object
typedef struct Va_listFW_t { char const* typeArgs; //types of arguments. va_list args; //pointer to the last known variable in stack } Va_listFW;In Java the instance contains a reference to
VaArgBuffer
only.
For compatibility with C-translated Java one can only initialize the Va_list
with a variable
which is the variable argument of a methods argument list. In Java semantic you can initalize with any variable,
but that is not able to translate from Java to C (Java2C).Modifier and Type | Field and Description |
---|---|
(package private) VaArgBuffer |
buffer |
static int |
version
Version, history and license.
|
Constructor and Description |
---|
Va_list(java.lang.Object... args)
Constructs a Va_list object which is the conterpart to a C-language
Va_listFW . |
Va_list(VaArgBuffer buffer) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object[] |
get()
Returns the stored arguments.
|
int |
size()
Returns the number of arguments in the variable argument list.
|
public static int version
size()
If size()=0 it has no data.
Then the list should not be used to invoke String.format(String, Object...)
.
final VaArgBuffer buffer
public Va_list(VaArgBuffer buffer)
public Va_list(java.lang.Object... args)
Va_listFW
.
The argument args
in C-language is a pointer to variable arguments in the stack,
more exact to the last known variable before a variable argument list follows. This last known variable
should be a String Literal with contains the type characters like "FIB"
by convention.
That is a pointer of type char const*
.
In C-language the both values are gotten with
myVA_list.typeArgs = args; va_start(myVA_list.args, args);In Java a variable argument list is a
Object[]
.args
- refers a variable argument list.public java.lang.Object[] get()
public int size()