dart / 2 / dart-core / invocation-class.html

Invocation class

Representation of the invocation of a member on an object.

This is the type of objects passed to Object.noSuchMethod when an object doesn't support the member invocation that was attempted on it.

Constructors

Invocation()
Invocation.genericMethod(Symbol memberName, Iterable<Type>? typeArguments, Iterable<Object?>? positionalArguments, [Map<Symbol, Object?>? namedArguments])
factory
Creates an invocation corresponding to a generic method invocation.
Invocation.getter(Symbol name)
factory
Creates an invocation corresponding to a getter invocation.
Invocation.method(Symbol memberName, Iterable<Object?>? positionalArguments, [Map<Symbol, Object?>? namedArguments])
factory
Creates an invocation corresponding to a method invocation.
Invocation.setter(Symbol memberName, Object? argument)
factory
Creates an invocation corresponding to a setter invocation.

Properties

hashCode → int
read-only, inherited
The hash code for this object.
isAccessor → bool
read-only
Whether the invocation was a getter or a setter call.
isGetter → bool
read-only
Whether the invocation was a getter call. If so, all three types of arguments lists are empty.
isMethod → bool
read-only
Whether the invocation was a method call.
isSetter → bool
read-only
Whether the invocation was a setter call.
memberName → Symbol
read-only
The name of the invoked member.
namedArguments → Map<Symbol, dynamic>
read-only
An unmodifiable view of the named arguments of the call.
positionalArguments → List
read-only
An unmodifiable view of the positional arguments of the call.
runtimeType → Type
read-only, inherited
A representation of the runtime type of the object.
typeArguments → List<Type>
read-only
An unmodifiable view of the type arguments of the call.

Methods

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

Operators

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

© 2012 the Dart project authors
Licensed under the BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.18.5/dart-core/Invocation-class.html