ConstructorArgumentValues class

Holder for constructor argument values used when instantiating a pod.

Supports both indexed arguments (explicit parameter positions) and generic arguments (matched by type). This class is essential for constructor injection in the dependency injection framework.

Example usage:

final cav = ConstructorArgumentValues();
cav.add(0, 'localhost', 'dart.core.String');
cav.add(8080, 'dart.core.int');

print(cav.getCount()); // 2
Mixed-in types

Constructors

ConstructorArgumentValues()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(String name, Object? value, {String? packageName, String? qualifiedName}) → void
Adds a generic argument value with an optional type.
addArgument(ArgumentValue argument) → void
Adds a generic argument value.
clear() → void
Clears all argument values (both indexed and generic).
copy() → ConstructorArgumentValues
Creates a deep copy of this ConstructorArgumentValues, preserving all ArgumentValues and their states.
equalizedProperties() → List<Object?>
Mixin-style contract for value-based equality, hashCode, and toString.
override
get({String? qualifiedName, String? name, String? packageName}) → ArgumentValue?
Retrieves the first generic argument value matching the requiredType, or returns null if none match.
getCount() → int
Returns the total number of argument values (both indexed and generic).
isEmpty() → bool
Returns true if there are no argument values defined.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toList() → List<ArgumentValue>
Returns a list of argument values.
toMap() → Map<String, ArgumentValue>
Returns a map of argument values, where keys are parameter names and values are ArgumentValues.
toString() → String
A string representation of this object.
inherited
toStringOptions() → ToStringOptions
override

Operators

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