CarpenterRuntime class final
Immutable typed capability registry for application-level Carpenter features.
Constructors
-
CarpenterRuntime([Map<
Type, Object> values = const {}]) -
Creates an immutable runtime from the supplied type-keyed values; the default
runtime is empty.
const
Properties
- core → CarpenterCoreRuntime
-
Available on CarpenterRuntime, provided by the CarpenterCoreRuntimeAccess extension
Mandatory core runtime capability containing effective platform and locale.no setter - frame → CarpenterFrameRuntime
-
Available on CarpenterRuntime, provided by the CarpenterFrameRuntimeAccess extension
Mandatory frame runtime capability; throws when no frame shell registered it.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- hotkeys → CarpenterHotkeyRuntime
-
Available on CarpenterRuntime, provided by the CarpenterHotkeyRuntimeAccess extension
Mandatory hotkey runtime capability; throws when no hotkey shell registered it.no setter - router → CarpenterRouterRuntime
-
Available on CarpenterRuntime, provided by the CarpenterRouterRuntimeAccess extension
Mandatory router runtime capability; throws when no router shell registered it.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
types
→ Set<
Type> -
Unmodifiable set of capability types currently registered in this runtime.
no setter
Methods
-
contains(
Type type) → bool - Reports whether a capability is registered for the exact supplied type key.
-
extend<
T extends Object> (T value) → CarpenterRuntime -
Returns a new runtime with
valueregistered under its generic typeT, replacing any previous value for that key. -
extendByType(
Type type, Object value) → CarpenterRuntime -
Returns a new runtime with
valueregistered under the explicittypekey, replacing any previous value for that key. -
maybeRead<
T extends Object> () → T? -
Reads the capability registered under
T, or returnsnullwhen the type is absent. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
read<
T extends Object> () → T -
Reads the capability registered under
T; throwsStateErrorwhen the type is absent. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited