A lazy value — a deferred computation that is resolved at synthesis time.
Use Lazy.any() to wrap a producer whose value is not yet known at construction time
(e.g. it depends on another resource that hasn't been defined yet).
The Lazy instance flows through the construct tree as a plain object reference.
At synthesis time, LazyResolver detects it and calls produce() to obtain the real value.
A lazy value — a deferred computation that is resolved at synthesis time.
Use
Lazy.any()to wrap a producer whose value is not yet known at construction time (e.g. it depends on another resource that hasn't been defined yet).The
Lazyinstance flows through the construct tree as a plain object reference. At synthesis time,LazyResolverdetects it and callsproduce()to obtain the real value.Example