RuntimeContext class abstract

Contextual values used during runtime.

Conditional import on dart.library.mirrors keeps dart:mirrors out of any AOT-compiled binary's import graph: the stub is selected when mirrors are unavailable (dart compile exe), the real fallback when they are (dart run, dart test). AOT users still must call bootstrap() from the build_runner-generated conduit.g.dart before any code reads current, or they'll hit a clear StateError.

Implementers

Constructors

RuntimeContext()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimes RuntimeCollection
The runtimes available to the executing application.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

coerce<T>(dynamic input) → T
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
operator [](Type type) → dynamic
Gets a runtime object for type.

Static Properties

current RuntimeContext
The current RuntimeContext available to the executing application.
no setter

Static Methods

install(RuntimeContext ctx) → void
Installs a pre-populated RuntimeContext. Intended to be called from generated code at the top of main() so that no mirror code is ever executed under dart compile exe.