CarpenterRuntime class

Typed runtime registry Carpenter.

Runtime хранит capabilities приложения: router, hotkeys, auth, overlay, DI-контейнеры и любые пользовательские приколдесы. Доступ идет по типу, поэтому shell-и и модули зависят от контрактов, а не от concrete classes.

Available extensions

Constructors

CarpenterRuntime([Map<Type, Object> values = const {}])
Создает runtime registry.
const

Properties

core CarpenterCoreRuntime

Available on CarpenterRuntime, provided by the CarpenterCoreRuntimeAccess extension

Core runtime приложения.
no setter
frame CarpenterFrameRuntime

Available on CarpenterRuntime, provided by the CarpenterFrameRuntimeAccess extension

Frame runtime.
no setter
hashCode int
The hash code for this object.
no setterinherited
hotkeys CarpenterHotkeyRuntime

Available on CarpenterRuntime, provided by the CarpenterHotkeyRuntimeAccess extension

Hotkey runtime.
no setter
router CarpenterRouterRuntime

Available on CarpenterRuntime, provided by the CarpenterRouterRuntimeAccess extension

Router runtime.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
types Set<Type>
Все зарегистрированные типы. Нужно для validation/debug.
no setter

Methods

contains(Type type) bool
Проверяет, есть ли capability с типом type.
extend<T extends Object>(T value) CarpenterRuntime
Добавляет или заменяет capability.
extendByType(Type type, Object value) CarpenterRuntime
Добавляет или заменяет capability с runtime-типом type.
maybeRead<T extends Object>() → T?
Возвращает capability типа T, если он зарегистрирован.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read<T extends Object>() → T
Возвращает capability типа T или бросает понятную ошибку.
toString() String
A string representation of this object.
inherited

Operators

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