ArgumentValueHolder class final

Argument Value Holder

Represents a structured container for arguments (both positional and named) passed to constructors, methods, or functions within the dependency injection / reflection framework.

Purpose

  • Provides a unified abstraction for storing arguments in different forms:
  • Useful when invoking executables (constructors/methods) reflectively, allowing consistent handling of parameter passing regardless of origin.

Behavior

  • Defaults to empty argument sets if none are provided.
  • Immutable references to the provided maps/lists ensure predictable argument evaluation.
  • Can be extended to carry additional metadata (see ExecutableHolder).

Example

final args = ArgumentValueHolder(
  namedArgs: {'timeout': 30},
  positionalArgs: ['db_connection'],
  arguments: [ArgumentValue.named('timeout', 30)],
);

print(args.namedArgs['timeout']);    // 30
print(args.positionalArgs.first);    // "db_connection"
print(args.arguments.first.name);    // "timeout"

Notes

  • Serves as the base class for ExecutableHolder.
  • Primarily used internally when resolving or invoking pods.
Implementers

Constructors

ArgumentValueHolder({Map<String, Object?> namedArgs = const {}, List<Object?> positionalArgs = const [], List<ArgumentValue> arguments = const []})
Argument Value Holder

Properties

arguments List<ArgumentValue>
Normalized argument list, where each argument is wrapped in an ArgumentValue abstraction.
final
hashCode int
The hash code for this object.
no setterinherited
namedArgs Map<String, Object?>
Named arguments passed to the executable.
final
positionalArgs List<Object?>
Positional arguments passed to the executable.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited