Abstract base class representing a dynamic or unconstrained type within the Jetleaf type system.
The Dynamic base class is used to model values whose type is not known
at compile time or is intentionally left unrestricted. It acts as a
counterpart to Dart’s built-in dynamic keyword, but within Jetleaf’s own
type-reflection and runtime-resolution framework.
Purpose
- Represent type-erased or dynamically-typed values in Jetleaf.
- Support APIs that require a type parameter but should accept any type.
- Enable reflection-driven operations where type information is discovered or resolved at runtime rather than statically.
- Provide a consistent internal marker for “unknown” or “flexible” types.
Features
- Abstract base: Cannot be instantiated directly.
- Type-agnostic: Serves purely as a symbolic or sentinel type.
- Runtime-friendly: Useful in dynamic dispatch, reflection, and JIT-resolution systems where types cannot be known ahead of time.
Example Usage
final dynamicClass = Dynamic.getClass();
// Used when a Jetleaf API should accept any possible value type
This allows Jetleaf components to express “no static type constraints” explicitly in their type signatures or runtime metadata.
Constructors
- Dynamic()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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