Mapper class abstract

Maps constructor arguments of an Immutable instance.

Example

See ImmutableKind.

Implementers

Constructors

Mapper()
const

Properties

canReturnSame bool
Whether the mapper can return the same instance it was given.
no setter
hashCode int
The hash code for this object.
no setterinherited
isGeneratingSource bool
Whether the mapper needs source code information such as constructor names.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

call<V>(V value, String name, {Kind<V>? kind, Kind? superKind, V? defaultConstant, String? jsonName, List<Trait> tags = const []}) → V
A shorthand for calling optional.
handle<V>({required ParameterType parameterType, required V value, required String name, Kind? kind, V? defaultConstant, String? jsonName, List<Trait>? tags}) → V
Handles calls to positional, optionalPositional, required, call, optional.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
optional<V>(V value, String name, {Kind<V>? kind, Kind? superKind, V? defaultConstant, String? jsonName, List<Trait> tags = const []}) → V
Maps an optional named parameter of a constructor.
optionalPositional<V>(V value, String name, {Kind<V>? kind, Kind? superKind, V? defaultConstant, String? jsonName, List<Trait> tags = const []}) → V
Maps an optional positional parameter of a constructor.
positional<V>(V value, String name, {Kind<V>? kind, Kind? superKind, String? jsonName, List<Trait> tags = const []}) → V
Maps a required positional parameter of a constructor.
required<V>(V value, String name, {Kind<V>? kind, Kind? superKind, String? jsonName, List<Trait> tags = const []}) → V
Maps a required named parameter of a constructor.
setConstructorIdentifier(String identifier) → void
Sets constructor identifier.
setDefaultValue(String name, Object? value) → void
Set default value.
toString() String
A string representation of this object.
inherited

Operators

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

Constants

deepCloning → const _DeepCloningMapper
A mapper that clones an object tree.