ProtocolDeserialization class
Immutable type declarations used to avoid probing unrelated protocols.
Generated protocols declare every local typed handler, including nullable and container types, and their dependencies in deserialization order. This metadata never changes class names or caches deserialized values.
Constructors
-
ProtocolDeserialization({required Iterable<
Type> types, required List<SerializationManager> modules, Iterable<String> ? classNames, String? classNamePrefix}) - Creates metadata for a generated protocol whose final fallback is SerializationManager.deserialize.
-
ProtocolDeserialization.cached(SerializationManager protocol, {required List<
Type Function()> types, required List<SerializationManager Function()> modules, List<String> ? classNames, String? classNamePrefix}) -
Reuses generated metadata until its declarations change on hot reload.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
modules
→ List<
SerializationManager> -
Module protocols in their original fallback order.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
modulesForDeserialization(
Type type, {String? className}) → List< SerializationManager> -
Returns modules that may decode
typeor the payload'sclassName. -
modulesForType(
Type type) → List< SerializationManager> -
Returns modules that may handle
type, preserving fallback order. -
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
Static Methods
-
normalizeClassName(
String? className, {String? prefix}) → String? -
Removes at most one occurrence of this protocol's
prefix. -
readClassName(
dynamic data) → String? - Reads the original class discriminator without removing a module prefix.