SPVM::Native::Arg − Information of Arguments
The Native::Arg class of SPVM has methods to manipulate information of arguments.
my $runtime =
Native−>get_current_runtime;
my $basic_type =
$runtime−>get_basic_type_by_name("Point");
my $method =
$basic_type−>get_method_by_name("new");
my $arg = $method−>get_arg_by_index(0);
my $arg_index = $arg−>get_index;
"method get_index : int ();"
Returns the index of this argument.
"method get_basic_type : Native::BasicType ();"
Return the basic type of this argument.
"method get_type_dimension : int ();"
Returns the type dimension of this argument.
"method get_type_flag : int ();"
Returns the type flag of this argument.
"method is_optional : int ();"
If this argument is an optional argument, returns 1, otherwise returns 0.
"method get_default_value_byte : byte ();"
Returns the default value of the optional argument arg of the "byte" type.
"method get_default_value_short : short ();"
Returns the default value of the optional argument arg of the "short" type.
"method get_default_value_int : int ();"
Returns the default value of the optional argument arg of the "int" type.
"method get_default_value_long : long ();"
Returns the default value of the optional argument arg of the "long" type.
"method get_default_value_float : float ();"
Returns the default value of the optional argument arg of the "float" type.
"method get_default_value_double : double ();"
Returns the default value of the optional argument arg of the "double" type.
"method get_default_value_object : object ();"
Returns the default value of the optional argument arg of an object type.
|
• |
Native::Method |
|||
|
• |
Native::BasicType |
|||
|
• |
Native::Runtime |
|||
|
• |
Native |
Copyright (c) 2023 Yuki Kimoto
MIT License