CanvasBuilder
Builder for constructing a Canvas with dependency bindings.
Use this builder to register dependencies that will be available for injection in tiles and other canvas-aware components.
Functions
Registers an externally owned value under type T, without a qualifier. Canvas never closes it, including on construction rollback. Use an explicit type argument to bind under an interface or superclass. Use provide to construct an owned value.
Registers an externally owned value under type T and qualifier. Canvas never closes it, including on construction rollback. A null qualifier means the unqualified binding. Use an explicit type argument to bind an interface or superclass. This mirrors provide<T>(qualifier) { ... } while leaving ownership with the external owner.
Registers an externally owned value. Canvas never closes this value, including on construction rollback. The external owner remains responsible for its lifetime. Available eagerly to constructors through CanvasFactory.source, with normal local-first lookup.
Registers a dependency for eager Canvas-owned construction. Returned AutoCloseable values are closed on Canvas close or construction rollback. Use instance for externally owned values, including aliases of dependencies obtained from a resolver.
Inherited functions
Integration-author installation hook, separate from the ordinary Canvas dependency DSL. Installs one supported observer for this Canvas and all descendants. Local, inherited, and reentrant duplicates fail before another factory executes. Failed factories leave configuration unchanged. Canvas never owns provider shutdown. Import this extension from the observation package explicitly.