NamedArguments extension

How generated code reads an optional named argument from the map of a BeanConstructor or BeanMethod call, as Function.apply passes it: the value when the map has it, else the parameter's default.

// Generated: Book(total: named.argumentOr(#total, 0))
on

Methods

argumentOr<T>(Symbol name, T absent) → T

Available on Map<Symbol, Object?>, provided by the NamedArguments extension

The argument name as a T, or absent when it is not passed.