Name

SPVM::Native::Arg - Information of Arguments

Description

The Native::Arg class of SPVM has methods to manipulate information of arguments.

Usage

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;

Instance Methods

get_index

method get_index : int ();

Returns the index of this argument.

get_basic_type

method get_basic_type : Native::BasicType ();

Return the basic type of this argument.

get_type_dimension

method get_type_dimension : int ();

Returns the type dimension of this argument.

get_type_flag

method get_type_flag : int ();

Returns the type flag of this argument.

is_optional

method is_optional : int ();

If this argument is an optional argument, returns 1, otherwise returns 0.

get_default_value_byte

method get_default_value_byte : byte ();

Returns the default value of the optional argument arg of the byte type.

get_default_value_short

method get_default_value_short : short ();

Returns the default value of the optional argument arg of the short type.

get_default_value_int

method get_default_value_int : int ();

Returns the default value of the optional argument arg of the int type.

get_default_value_long

method get_default_value_long : long ();

Returns the default value of the optional argument arg of the long type.

get_default_value_float

method get_default_value_float : float ();

Returns the default value of the optional argument arg of the float type.

get_default_value_double

method get_default_value_double : double ();

Returns the default value of the optional argument arg of the double type.

get_default_value_object

method get_default_value_object : object ();

Returns the default value of the optional argument arg of an object type.

See Also

Copyright & License

Copyright (c) 2023 Yuki Kimoto

MIT License