LazyConstantsCodec class

Lazy loading constants codec with advanced control

This codec provides fine-grained control over when constants are loaded and decoded, optimizing memory usage and initialization time.

Constructors

LazyConstantsCodec(MetadataTypeRegistry registry)

Properties

hashCode → int
The hash code for this object.
no setterinherited
registry → MetadataTypeRegistry
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

clearCache({bool onlyValues = false}) → void
Clear cache with different levels
getConstant(String palletName, String constantName) → dynamic
Get a constant value (lazy decoded)
getConstantInfo(String palletName, String constantName) → ConstantInfo?
Get constant info without decoding the value This is very lightweight as it doesn't decode the actual constant value
getLoadingStats() → Map<String, int>
Get loading statistics
isConstantLoaded(String palletName, String constantName) → bool
Check if a constant is loaded without triggering loading
isPalletFullyLoaded(String palletName) → bool
Check if a pallet is fully loaded
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
preloadConstants(List<(String, String)> constants) → void
Preload specific constants (useful for critical path optimization)
preloadPallet(String palletName) → void
Preload all constants for a pallet
toString() → String
A string representation of this object.
inherited

Operators

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